Forum Discussion

EdouSav's avatar
EdouSav
Helper I
2 years ago
Solved

issue grand total

hey ! 

 

Another problem with Grand TOTAL

this is my measure 

 

VAR _SelectedExercice = SELECTEDVALUE(CalendarFiscal[ExerciceComptable])
var _TauxdeMarge = CALCULATE(maxx(Marges,Marges[Valeur]),Marges[Exercice] = _SelectedExercice)
var _TotalCA = [Total_CA]
var _MontantMarge = _TotalCA*_TauxdeMarge
return _MontantMarge

 

my data

Table DataCA link with table family (dataca.libfam = family.lib.famille)

Table Marge (year, %marge,libFam) (marge.libFam = family.libfamille)

 

 

VAR _SelectedExercice = SELECTEDVALUE(CalendarFiscal[ExerciceComptable])

 

this var is for determinate the good fiscalyear selected

 

var _TauxdeMarge = CALCULATE(maxx(Marges,Marges[Valeur]),Marges[Exercice] = _SelectedExercice)

 

this var is too keep the good rate 

 

 

var _TotalCA = [Total_CA]

 

this var to keep the "totalrevenue"

 

var _MontantMarge = _TotalCA*_TauxdeMarge
return _MontantMarge

 

this var _montantmarge, too have the marge amount

 

return _montantmarge, 

 

i used a matrix with rows = family.libfamille

i have a slicer with year (calendar table link with dataCA)

 

at the rows all is correct but the grand total is not correct !

thanks a lot 

2 Replies