Forum Discussion
Cactus26
Helper I
9 years agoCount unique values
Hi, I am struggling with creation of the measure which will be recalculated after the filters in report via slicers will be selected. I was able to get the same effect using calculated columns, ...
- 9 years ago
Hi,
Something like this should work (did not test it, writing it blind)
COUNTROWS ( FILTER ( VALUES ( Table[YourColumn] ), CALCULATE ( COUNTROWS ( Table ) = 1 ) ) and COUNTROWS ( FILTER ( VALUES ( Table[YourColumn] ), CALCULATE ( COUNTROWS ( Table ) >= 3 ) )
Of course, by playing with the condition of FILTER, you can achievev different results.
Have fun with DAX!
Alberto Ferrari
http://www.sqlbi.com
Anonymous
9 years agoNot applicable
hi Cactus26,
Does this solve your issue..
Count Measure_1 =if(COUNT(Test[test])<=1,count(Test[test]),blank())
Count Measure_2 =if(COUNT(Test[test])<=3,count(Test[test]),blank())
I have put your test data in a table name Test & in a column in it name test.
Regards