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
Oros
Post Prodigy
Post Prodigy

Add filter to a measure

Hello.

 

How do you add filters to a measure?  I plan to create 2 measures (with filters) and add them together by creating another measure.

 

For example, I would like to create a measure for SALES based on (specific date and specific customers).

 

So if total sales for 5 (customers A, B, C, D, E) customers for the month of January=100 

 

What would the the measure to get the January sales for 3 customers only (A, B and C)?

 

Thanks.

 

1 ACCEPTED SOLUTION
JirkaZ
Solution Specialist
Solution Specialist

First of all define the base measure

Base Sales Measure := SUM('MyTable'[Sales])

Then you can build on top of that measure

Sales For Selected Customers January := CALCULATE([Base Sales Measure],
   'MyTable'[Customer Name] in {"A", "B", "C"},
   'DimDate'[MonthName] = "January"
)

I hope you got the logic

View solution in original post

3 REPLIES 3
v-zhangti
Community Support
Community Support

Hi, @Oros 

 

Can you provide sample data for testing? Sensitive information can be removed in advance. What kind of expected results do you expect? You can also show it with pictures or Excel. I look forward to your response.

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

JirkaZ
Solution Specialist
Solution Specialist

First of all define the base measure

Base Sales Measure := SUM('MyTable'[Sales])

Then you can build on top of that measure

Sales For Selected Customers January := CALCULATE([Base Sales Measure],
   'MyTable'[Customer Name] in {"A", "B", "C"},
   'DimDate'[MonthName] = "January"
)

I hope you got the logic

Hello @JirkaZ ,

 

Thank you so much!.  It works!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.

Top Solution Authors