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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
amtbew
Helper I
Helper I

Conflicting Results from Dim Table Calculated Column

I'm trying to add a column to a dim table that checks to see if a certain type of spend is present in my fact table. I'm getting incorrect info back and not sure what the reason.

 

I have a simple measure to sum spend in 2 different categories.

 

Spend - Category 1 = 
CALCULATE(
	SUM('Spend History'[Total Billed ($)]),
	'Spend History'[Work Order Type] IN { "Recurring Service", "Preventive Maint" }
)

 

 

 

I added this column to my dim table (Site Information).

Has Category 1 Spend = if(Calcs[Spend - Category 1]>0,"true","false")

 

Site Information and Spend History are linked by a many to one relationship "Site ID"

 

Here's the outcome as expected

amtbew_0-1709222327546.png

However, if this particular Site ID reports as true, yet when you click on it you can see there is no actual spend in those categories.

amtbew_0-1709222486925.png

Any ideas?

1 ACCEPTED SOLUTION

I figured out your issue. Since you have that formula in a calculated column, it is not being filtered by the filters you have on the page. This is because the result is calculated in the data model instead of on the page. So, if you delete your calculated column, use that DAX code in a measure, and then drag that measure into your DIM visual, it will work. 

Please mark as a solution if this answered your question!

View solution in original post

6 REPLIES 6
nsexton12
Resolver II
Resolver II

I know it is not usually recommended, but could you change your relationship to many-to-many and see if that fixes your issue? It looks like a relationship problem at first glance. If not, please let me know and I will test alternative solutions.

 

Please mark as a solution if this worked for you!

I tried Many to Many and it didn't change the outcome. 

I recreated your data in my file and it all worked properly. Maybe it is the syntax of your calculated column? 

I am not sure why you have Calcs[Spend-Category 1] when it is just a measure. Can you try just typing in [Spend-Category 1]? My calculated column was:  IF([Measure 1] > 0 , "true","false").

My measure is in a measure table called Calcs. 

 

I tried moving the measure out of that table and referencing it like you said and it still returns the same result. 

Can you scrub sensitive data and attach your PBIX file? I can't recreate your issue on my end and will need to see your full file unless someone else sees an error. 

I figured out your issue. Since you have that formula in a calculated column, it is not being filtered by the filters you have on the page. This is because the result is calculated in the data model instead of on the page. So, if you delete your calculated column, use that DAX code in a measure, and then drag that measure into your DIM visual, it will work. 

Please mark as a solution if this answered your question!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.