Forum Discussion
bitofanewb
6 months agoFrequent Visitor
IF statement logical test needs split by DISTINCT
Hi, I need to count the number of distinct [Qual] where [_BestX CY] < [_Prev Yr Avg]. [Qual] is a column, [_BestX CY] and [_Prev Yr Avg] are both measures - all within the same table. The ...
- 6 months ago
I think you could use a measure like
Count distint qual = COUNTROWS ( FILTER ( DISTINCT ( 'Table'[Qual] ), [_BestX CY] < [_Prev Yr Avg] ) )
johnt75
6 months agoSuper User
I think you could use a measure like
Count distint qual =
COUNTROWS (
FILTER ( DISTINCT ( 'Table'[Qual] ), [_BestX CY] < [_Prev Yr Avg] )
)
bitofanewb
6 months agoFrequent Visitor
Yes, that's exactly it. I had most of that in another attempt, I was just missing FILTER between COUNTROWS and DISTINCT.
Thanks so much for your really quick reply and help, it's greatly appreciated.