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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello Community,
I have a question and a problem with my calculation when I filter
The total values are unfortunately not correct. Cost should be 20314,20 Euro and costaggretierteuro 14175,75 Euro.
I have the following tables.
1 Table with Valuenames
2 fact tables with cost (as a total) and the other fact table (costaggregierteuro (as a total).
I filter by the valuenames and the problem only occurs when I select all valuenames or 2 or more. If I select only one value, the calculation is correct.
If I execute all this in T-SQL then I get the correct values.
What am I doing wrong?
If you need more information, please ask.
Many thanks in advance.
Spaceman127
Solved! Go to Solution.
Hi @spaceman127 ,
You can create another two measures as below to get it:
Sum of Cost= SUM('facttable1'[cost])
New_sumofcost=sumx(values('dimAzTags'[Valuename]),[Sum of Cost])
Sum of costaggregierteuro= SUM('facttable1'[costaggregierteuro])
New_sumofcostagg=sumx(values('dimAzTags'[Valuename]),[Sum of costaggregierteuro])
In addition, you can refer the following links to try to solve your problem...
Why Your Total Is Incorrect In Power BI - The Key DAX Concept To Understand
Dax for Power BI: Fixing Incorrect Measure Totals
Best Regards
Hello @spaceman127
You can Try this Measure for cost
Cost = Sumx( YourTable[ValueName],[Cost] )
It will great if you can share the pbix file.
Hope it will help you.
regards
sanalytics
If it is your solution then please like and accept it as solution
Thank you for your answer, I can't share the pbix because it contains data that I can't pass on.
I have taken a screenshot of the data model.
Sorry for the inconvenience.
I have now extended the data model as it actually looks now.
I practically filter the value name (dimAzTags) and then get the resources with the costs that have a tag.
My assumption is that the relationship between the dimAzTags table and the resource table is the problem.
Unfortunately I can't solve this easily.
It would be better to adjust the measure if that is possible.
Does that help?
Thanks in advance.
spaceman127
Hi @spaceman127 ,
You can create another two measures as below to get it:
Sum of Cost= SUM('facttable1'[cost])
New_sumofcost=sumx(values('dimAzTags'[Valuename]),[Sum of Cost])
Sum of costaggregierteuro= SUM('facttable1'[costaggregierteuro])
New_sumofcostagg=sumx(values('dimAzTags'[Valuename]),[Sum of costaggregierteuro])
In addition, you can refer the following links to try to solve your problem...
Why Your Total Is Incorrect In Power BI - The Key DAX Concept To Understand
Dax for Power BI: Fixing Incorrect Measure Totals
Best Regards
Hi,
Thank you for your help.
This is the solution to my problem.
Best Regards