Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Narendra90
Frequent Visitor

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 criteria like ( country = India && year =2023 etc). 

There are chances that filters will be added some criteria in future or will be removed. In that case i need update all the measures in dashboard. 

do we have any solution on this.

Appreciate your help.

Thanks

1 ACCEPTED SOLUTION

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 () )
)

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

3 REPLIES 3
Narendra90
Frequent Visitor

Hey, Any other solution? cant create column here. Its connected to live data. we can request to create column once but modifing criteria multiple time would be headache to admin.

cant we create measure and refer that in another something like this.

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 () )
)

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
danextian
Super User
Super User

hi @Narendra90 ,

 

You can create a calculated column based on a certain logic and use it to filter the entire report or just a page. 

Filter column =
'table'[country] = "India"
    && 'table'[year] = 2021

this will return TRUE/FALSE. Use this in  the filter pane and set the value to true. Or

Filter column =
IF ( 'table'[country] = "India" && 'table'[year] = 2021, 1, 0 )

For the above, set the value to 1. Or if you have list of countries in another table which is updated as needed

Filter column =
VAR _COUNTRY =
    LOOKUPVALUE (
        'country table'[country],
        'country table'[country], 'table'[country]
    )
RETURN
    IF ( NOT ( ISBLANK ( _COUNTRY ) ) && 'table'[year] = 2021, 1, 0 )

 

The filter logic depends entirely on how you expect your data will change.

 

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors