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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
spencer_II
Helper I
Helper I

If then measure returning incorrect totals

Sooo.... I have exhausted options, video's and forumns for a solution.  Mutliple attempts with SUMX and SUMX w/ SUMMARIZE. None leading to a correct total.

 

Customer and Item No-Description are from two different dimension tables. The solutions attempted would have worked if first two columns both existed in same table.

Cnt Fcst equals Bdgt is an if/then measure as follows:

Cnt Fcst equals Bdgt =
VAR doesmatch=IF([Forecast Cases]=[Budget Cases],1,blank())
RETURN
doesmatch

sshot-413.png

So total is 4, which is correct at an Item No-Description level, But INCORRECT when adding column for Customer ID.  Correct total should be 430.  Each customer/item combination where Budget ='s Forecaset should be 1 and the total (customer/item) would total 430.

 

Hope this is sufficient to get some feedback on the correct pattern.

 

As Always, appreciate the help.

 

Spencer

1 ACCEPTED SOLUTION
spencer_II
Helper I
Helper I

So here is the fix...  Two seperate tables requires the SUMMARIZE to be used w/ BOTH Filter context and SUMX.

Like the following:

SUMX(
FILTER(
SUMMARIZE('Tbl_Budget2020','Tbl_Customers DIM'[CUSTOMER],'Tbl_Product(ADJ) DIM'[Item No-Description]),
[Cnt Fcst equals Bdgt]=1),
[Cnt Fcst equals Bdgt])
This worked and returned the correct totals with columns from different dimension tables.

View solution in original post

1 REPLY 1
spencer_II
Helper I
Helper I

So here is the fix...  Two seperate tables requires the SUMMARIZE to be used w/ BOTH Filter context and SUMX.

Like the following:

SUMX(
FILTER(
SUMMARIZE('Tbl_Budget2020','Tbl_Customers DIM'[CUSTOMER],'Tbl_Product(ADJ) DIM'[Item No-Description]),
[Cnt Fcst equals Bdgt]=1),
[Cnt Fcst equals Bdgt])
This worked and returned the correct totals with columns from different dimension tables.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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