Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago

Total in matrix is not correct - Need help

Hi ! I need help.

I have a measure in a matrix and the total is incorrect . It affects a lot of other numbers in my file : 


Here is the dax for the measure SommePrédictionVentesNettes : 

SommePrédictionVentesNettes = 
calculate([_PrédictionVentesNettes], 'Date'[FISCALPER] = 1)
+ calculate([_PrédictionVentesNettes], 'Date'[FISCALPER] = 2)
+calculate([_PrédictionVentesNettes], 'Date'[FISCALPER] = 3)
+calculate([_PrédictionVentesNettes], 'Date'[FISCALPER] =4)
+calculate([_PrédictionVentesNettes], 'Date'[FISCALPER] = 5)
+calculate([_PrédictionVentesNettes], 'Date'[FISCALPER] = 6)
+calculate([_PrédictionVentesNettes], 'Date'[FISCALPER] = 7)
+calculate([_PrédictionVentesNettes], 'Date'[FISCALPER] = 8)
+calculate([_PrédictionVentesNettes], 'Date'[FISCALPER] = 9)
+calculate([_PrédictionVentesNettes], 'Date'[FISCALPER] = 10)
+calculate([_PrédictionVentesNettes], 'Date'[FISCALPER] = 11)
+calculate([_PrédictionVentesNettes], 'Date'[FISCALPER] = 12)

And here is the Dax fo the measure [_PrédictionVentesNettes] : 

_PrédictionVentesNettes = 
if(
calculate(sum(VentesSku[SALESVALUE]), dateadd('Date'[TRANSDATE], -12, month))
=blank(),
calculate(sum(VentesSku[SALESVALUE]), dateadd('Date'[TRANSDATE], -24, month)),
calculate(sum(VentesSku[SALESVALUE]), dateadd('Date'[TRANSDATE], -12, month)))
* (1+ AVERAGE('Prévisions'[AugmentationVN]))


Can you please help me!



3 Replies