Forum Discussion
litifeta
10 years agoAdvocate II
Help with a count function in DAX
Having trouble with something that is so simple in Excel I have a column of project names and blanks. I want a measure to calculate the unique text values so I can determine how many projects are...
Anonymous
10 years agoNot applicable
Sean my company database has crapped out this morning so I have nothing to do. So it's either this or play games on my phone. And now we all know a little more about how DAX handles blanks.
Edit: also, so much coffee. I'm basically on an IV drip at this point.
Sean
10 years agoCommunity Champion
Anonymous :smileylol: :smileylol: :smileylol:
- Sean10 years agoCommunity Champion
Anonymous With a slight adjustment my formula works on both numbers and text columns - and so does NOT (ISBLANK ...
Projects TEXT & NUMBERS = CALCULATE ( DISTINCTCOUNT ( 'Table'[Project] ), FILTER ( 'Table', 'Table'[Project] <> BLANK() ) ) Projects ALT TEXT & NUMBERs = CALCULATE ( DISTINCTCOUNT ( 'Table'[Project] ), NOT ( ISBLANK('Table'[Project]) ) )