Forum Discussion

bitofanewb's avatar
bitofanewb
Frequent Visitor
6 months ago
Solved

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 ...
  • johnt75's avatar
    6 months ago

    I think you could use a measure like

    Count distint qual =
    COUNTROWS (
        FILTER ( DISTINCT ( 'Table'[Qual] ), [_BestX CY] < [_Prev Yr Avg] )
    )