Forum Discussion

amaleranda's avatar
amaleranda
Post Patron
7 years ago
Solved

DAX - Frequency Count.

Hi DAX gurus,   I want to count frequency  and duration of the group. Both needs to count when [Avil] columns = 0.(I can achieve this by using a page/visual level filter.there are multiple groups. ...
  • v-frfei-msft's avatar
    7 years ago

    Hi amaleranda ,

     

    1. To create a calculated column as below.

     

    Column = 
    CALCULATE (
        SUM ( 'Table'[Avil] ),
        FILTER (
            ALL ( 'Table' ),
            'Table'[Time] <= EARLIER ( 'Table'[Time] )
                && 'Table'[Group] = EARLIER ( 'Table'[Group] )
        )
    )
    

    2.Then we can create the Frequency measure.

    Frequency = CALCULATE(DISTINCTCOUNT('Table'[Column]),FILTER('Table','Table'[Avil] = 0))