Forum Discussion

matdub40's avatar
matdub40
Helper III
4 years ago
Solved

Automatically calculated sum is wrong

Hello,

I have a problem in Power BI that I don't understand.

I have a table Y2_Tarif that contains values like this:

stylecode prix code_tarif
000453-ET1 38,7 T40
000453-ET2 38,7 T40
00091-ET1 34,1 T40

 

I have a first formula which is :
Sum_Price:=CALCULATE(sum(Y2_Tarif[prix]))

And a second one which is: Valo_T40_TY:=([Sum_Price])*(Y2_Sales[TY_Units])
TY_Units is the number of units sold.

Opening my model in Excel or Power BI directly I get this :

 

 

The formula makes me Units * price.
But in the automatically calculated sum I find a huge number which is not the real sum.

For example this with Excel :

 

There should be a sum of 321 639.85€ but I get 46 256 976.99€. Same thing in Power BI:

I don't have many numbers, the sum doesn't add up to 8 108 209.20€. All the other sums are correct, like the Units sum but not this one.

I don't understand how to change this automatically calculated sum. And where can this large value come from? I have looked at my relationships between the tables and they look good.

Thanks for your help

6 Replies