Forum Discussion

meskens's avatar
meskens
Frequent Visitor
3 years ago
Solved

Countrows/Distinctcount DAX question

Hi all,   Maybe you could help me with this one. I'm trying to how many employees are in a certain category of average sickness (for example 0), based on the months selected in the slicer. I have...
  • tamerj1's avatar
    tamerj1
    3 years ago

    meskens 
    The > 3.5 seems to be working. Not sure why you're facing issues with it. I prepared a quick sample file for testing the 3 formulas.

    Aantal 0 = 
    SUMX (
        VALUES ( '2023'[Naam/voornaam] ),
        INT ( MAXX ( CALCULATETABLE ( VALUES ( '2023'[Maand] ) ), [Percentage] ) = 0 )
    )
    Aantal > 3.5 = 
    SUMX (
        VALUES ( '2023'[Naam/voornaam] ),
        INT ( MAXX ( CALCULATETABLE ( VALUES ( '2023'[Maand] ) ), [Percentage] ) > 3.5 )
    )
    Aantal 0-3.5 = 
    SUMX (
        VALUES ( '2023'[Naam/voornaam] ),
        VAR MaxPercxent =
            MAXX ( CALCULATETABLE ( VALUES ( '2023'[Maand] ) ), [Percentage] ) 
        RETURN
            INT ( MaxPercxent > 0 && MaxPercxent < 3.5 )
    )