Forum Discussion

spaceman127's avatar
spaceman127
Super User
2 years ago
Solved

Question about Power Bi Dekstop incorrect total value

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

 

 

 

4 Replies

  • 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

     

    • spaceman127's avatar
      spaceman127
      Super User

      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