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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
AdrianSko
New Member

Merge two filters to apply across report using measure

Hi, honestly Im coming here as a desperate DAX noob and I hope somebody can help me 🙂

 

I have a live connection (so Im not able to edit/add columns) in my report with many pages. I got a request to exclude a specific type of products from one group, from the entire report. Let's say, I have group of products X, Y, Z, next I have a layer for each group with the types of products A B C. What I want to achieve is to exclude type A from group X only.

 

I know that I cannot apply filters with an IF statement also I can't apply measure as a filter as long as it's not a calculated measure (but that would require writing new measures for each value I have in charts). Please correct me if I'm wrong.

 

What could be the best efficient way to apply that exclusion? I don't want to apply it on each chart separately and write measures for each value.  Many thanks in advance!

 

 

1 ACCEPTED SOLUTION
ValtteriN
Super User
Super User

Hi,

You can use filter measure combined with a calculation group to achieve this. E.g.

Table:

ValtteriN_0-1667813988596.png

 

Filter Measure for Q2 and Q3 = if(MAX('Table (9)'[Quarter]) in {"Q2","Q3"},1,0)


calculation group:

calculate(selectedmeasure(),FILTER('Table (9)',[Filter Measure for Q2 and Q3] = 1))


This approach will filter the target table based on the if logic. So in this case My visual will only show Q2 and Q3 values:

ValtteriN_2-1667813797557.png



Edit, here is a link to an article by SQLBI about calculation groups:

Introducing Calculation Groups - SQLBI





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

Proud to be a Super User!




View solution in original post

1 REPLY 1
ValtteriN
Super User
Super User

Hi,

You can use filter measure combined with a calculation group to achieve this. E.g.

Table:

ValtteriN_0-1667813988596.png

 

Filter Measure for Q2 and Q3 = if(MAX('Table (9)'[Quarter]) in {"Q2","Q3"},1,0)


calculation group:

calculate(selectedmeasure(),FILTER('Table (9)',[Filter Measure for Q2 and Q3] = 1))


This approach will filter the target table based on the if logic. So in this case My visual will only show Q2 and Q3 values:

ValtteriN_2-1667813797557.png



Edit, here is a link to an article by SQLBI about calculation groups:

Introducing Calculation Groups - SQLBI





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

Proud to be a Super User!




Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.