Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Add a Filter in a dax formula

Hi everyone, 

I have a DAX formula that is working ok, but i need to add a filter.

My actual DAX formula is:

Enabled  = CALCULATE((COUNTROWS('Peru - Registros y MAU GRUPO'),'Peru - Registros y MAU GRUPO'[Estado]="Enabled")
In the same table, i have a row with ages. I need to add in the previous formula the filter "less or equal than 30".
 
So the final result of the formula will only count the enable that has less or equal than 30.
 
Any body knows how??
thanks a lot!!
  • Anonymous 

     

    Try

     

    Enabled =
    CALCULATE (
        COUNTROWS ( 'Peru - Registros y MAU GRUPO' ),
        'Peru - Registros y MAU GRUPO'[Estado] = "Enabled",
        'Peru - Registros y MAU GRUPO'[Ages] <= 30
    )
    

2 Replies

  • Zubair_Muhammad's avatar
    Zubair_Muhammad
    Icon for Community Champion rankCommunity Champion

    Anonymous 

     

    Try

     

    Enabled =
    CALCULATE (
        COUNTROWS ( 'Peru - Registros y MAU GRUPO' ),
        'Peru - Registros y MAU GRUPO'[Estado] = "Enabled",
        'Peru - Registros y MAU GRUPO'[Ages] <= 30
    )
    
    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks a lot!!!!!