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
robertpayne21
Frequent Visitor

Create a group of filters to reuse in subsequest measures.

Hi All,

 

I'm working on a dashboard and I'm creating some measures.  For example

 

Sales

COGS

Profit

Net Profit

GP

 

I would like to display both sold and pending on a single matrix.

 

The question is, can I avoid passing through filter conditions that are the same.  The four filters would need to be applied to each calculate statement.  Is there a more optimal method of stating the filter group once and referencing it throughout the model.  

 

i.e.

GP = CALCULATE(sum(Sample[GP]),
Sample[NUMBER]=340,
Sample[Customer]<>0,
Sample[Store_Number]<>70,
Sample[CATEGORY] = "Sold")
 
 
GP = CALCULATE(sum(Sample[Sales]),
Sample[NUMBER]=340,
Sample[Customer]<>0,
Sample[Store_Number]<>70,
Sample[CATEGORY] = "Sold")
 
 
1 REPLY 1
Syk
Super User
Super User

You could create a calculated column to fit all those requirements and reference it. Should at least make it more readable so your measures would be like

GP = CALCULATE(sum(Sample[Sales]),
Sample[include_me]="Yes")



Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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