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

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

Reply
Quest
Advocate I
Advocate I

Help with measure removing a column from the context

Hi all,

 

I have a table with numerous fields and I want to show a table in my report with following fields only:

Date, Product Category, Unit

 

This is how my data (fields I am trying to show in my table) looks like:

Date, product category, sales unit, forecast unit

Jan , A, 10, 10

Jan, B, 15,20

Jan, C, 15,10

Feb, A, 10,20

Feb, B, 10,10

 

I want to derive the final table as below. Note that units in this table is the forecast unit - sales unit for a month, without considering the product category.

 

Date, Product category, Units

Jan , A, 0

Jan, B, 0

Jan, C, 0

Feb, A, 10

Feb, B, 10

 

I tried using All and AllExcept, but didnt seem to work. I could be doing something wrong. Please help me with this. 

1 ACCEPTED SOLUTION

Thanks a lot. I didnt create it as a measure, my bad. 

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@Quest , Try a measure like

calculate(sum(Table[forecast]) - sum(Table[Sales]), filter(allselected(Table), Table[Date] =max(Table[Date])))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks Amitchandak for the quick response. But this does not seem to be working for me.

Date, Product category, Units

Jan , A, 10

Jan, B, 10

Jan, C, 10

Feb, A, 10

Feb, B, 10

 

For Jan, the data should show 0 as the difference for Jan is 0 and for Feb it should show 10.

@Quest , Please find if the attached file can help

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks a lot. I didnt create it as a measure, my bad. 

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.