Results 1 to 5 of 5

Thread: Article: Using HASONEVALUE in a DAX IF statement

  1. #1
    Administrator Ken Puls's Avatar
    Join Date
    Mar 2011
    Nanaimo, BC, Canada
    Blog Entries
    Excel Version
    Excel Office 365 Insider

    Article: Using HASONEVALUE in a DAX IF statement

    Register for a FREE account, and/
    or Log in to avoid these ads!

    Ken Puls, FCPA, FCMA, MS MVP

    Learn to Master Your Data at the Power Query Academy (the world's most comprehensive online Power Query training), with my book M is for Data Monkey, or our new Power Query Recipe cards!

    Main Site: -||- Blog: -||- Forums:
    Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter

    If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.

  2. #2
    hi ken,

    this is an excellent article. I have been looking all over for an explanation of HASONEVALUE. This will help me complete some of the reports i was building for finance myself.

    Thanks and Regards

  3. #3

    Formula guidance request

    Hi Ken,
    Really enjoyed your video at PowerPivot School. Thank you for great, detailed instructions. This post is also very illuminating and useful. One quick question.... the formula
    IF(VALUES(tblCOA[AccGroup])= "Expenses",-1,-1)
    should it not be IF(VALUES(tblCOA[AccGroup])= "Expenses",-1,1)
    this seems to be the case the first time it was introduced but then uses -1 in second argument, for which I didn't understand the logic/reasoning, your guidance would be most appreciated.

    Many thanks.... and keep up the good work.


  4. #4
    Neophyte amit4blog's Avatar
    Join Date
    Dec 2013
    Hi Ken,

    It's a great post. I am looking some extra ordinary article, which i found here.Thanks for publishing.

  5. #5
    Hi Ken

    Like others I found your post very helpful - thanks.

    One thing I am having a bit of trouble with is taking this down to another level ie the next account sub group. For example, what if "Alcoholic Beverages" was broken down into "Beer", "Wine", "Spirits" etc and "Cost of Sales" was broken down into "Food", "Beverages", "Condiments" etc.

    I can get the individual items eg "Beer" and "Food" to display correctly, but not the subtotals for "Alcoholic Beverages" or "Cost of Sales". Any thoughts on how this might be done?


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts