Forum Discussion
Cactus26
8 years agoHelper I
Count 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, ...
- 8 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
AlbertoFerrari
8 years agoMost Valuable Professional
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
- Cactus268 years agoHelper I