Forum Discussion

Narendra90's avatar
Narendra90
Frequent Visitor
3 years ago
Solved

dynamic filter criteria

Hi Team, I have created mulitiple measures in dashboard. All measures based on different columns ( Project value, Initial value, Actual value, No of emp etc). However everyone has same filter criter...
  • danextian's avatar
    danextian
    3 years ago

    You can create a measure and reference that in another measure

    filter measure =
        CALCULATE (
            COUNTROWS ( 'table' ),
            FILTER ( 'table', 'table'[country] = "India" && 'table'[year] = 2021 )
        )
    
    another measure =
    CALCULATE (
        SUM ( 'table'[value] ),
        FILTER ( 'table', [filter measure] <> BLANK () )
    )