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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
Anonymous
Not applicable

Unwanted products showing when adding measures

Hello Power BI community! I'm currently studying business intelligence and am stuck on an assignment. We've been told to measure revenue from weeks where a store has had a campaign. I.E. during all 52 weeks of a year we've had different campaigns for different products, and I want to find a way to see the total sales/total revenue from the products on campaign.

 

The issue I've been facing is that as soon as I add a measure to calculate margins (or any measure at all) in my table/matrix, the table automatically includes ALL products from the store, instead of only including those on campaign. (Adding pictures to show what happens when I've added total sales to the table).

 

Does anyone know where my problem might stem from? Is it a modelling issue or am I just overthinking this?ModellingModellingHere I've added total sales value to my tableHere I've added total sales value to my tableHere's my table with sales per campaign weeksHere's my table with sales per campaign weeks

 

1 REPLY 1
v-stephen-msft
Community Support
Community Support

Hi @Anonymous ,

 

Could you please tell me what's the formula of your total sales?

Try to use 

FILTER(ALLSELECTED('TABLENAME'),[COLUMNNAME]=MAX('TABLENAME'[COLUMNNAME]))

to get the context filters you want.

 

 

Best Regards,

Stephen Tao

 

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

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors