Forum Discussion

Avivek's avatar
Avivek
Post Partisan
5 years ago
Solved

Help with DAX

I have a report the requirement for which is i need to show the all the orders which has been entered without the id. in a visual i can see this by adding it in the filter.  But now  I have to show ...
  • richbenmintz's avatar
    5 years ago

    Hi Avivek,

     

    Not sure why you have Blank() in Quotations, it is not a string but the equivalent of NULL, following should fix that issue.

    Column = CALCULATE(DISTINCTCOUNT('SURGEON SALES'[ORDER_ID]),FILTER('SURGEON SALES','SURGEON SALES'[NPI]=BLANK()))

     However given that it looks like you are creating a column to count the following would be easier

    Column = IF('SURGEON SALES'[NPI]=BLANK(), 1, blank())

    Better yet create a measure that counts the rows you are interested in

     

     Blank ID = CALCLUATE(COUNTROWS('SURGEON SALES'), 'SURGEON SALES'[NPI]=BLANK())

     

    Hope this Helps,
    Richard
    Did I answer your question? Mark my post as a solution!
    Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!