Forum Discussion

sabd80's avatar
sabd80
Icon for Helper IV rankHelper IV
1 year ago

Wrong Column Totals

Hi,
My issue is the Column Totals is wrong, the row total is correct, it shows the value of the Max 'Calendar'[Simplot_Month_Relative].

this the measure:

Testing2 Actual vs Forecasts $ =
VAR MonthRelative =SELECTEDVALUE('Calendar'[Simplot_Month_Relative])
RETURN
SWITCH(TRUE(),
MonthRelative = -11, [Cases Actual] - [Cases Forecast M-11],
MonthRelative = -10, [Cases Actual] - [Cases Forecast M-10],
MonthRelative = -9, [Cases Actual] - [Cases Forecast M-9],
MonthRelative = -8, [Cases Actual] - [Cases Forecast M-8],
MonthRelative = -7, [Cases Actual] - [Cases Forecast M-7],
MonthRelative = -6, [Cases Actual] - [Cases Forecast M-6],
MonthRelative = -5, [Cases Actual] - [Cases Forecast M-5],
MonthRelative = -4, [Cases Actual] - [Cases Forecast M-4],
MonthRelative = -3, [Cases Actual] - [Cases Forecast M-3],
MonthRelative = -2, [Cases Actual] - [Cases Forecast M-2],
MonthRelative = -1, [Cases Actual] - [Cases Forecast M-1],
MonthRelative = 0, [Cases Actual] - [Cases Forecast M-0]
)

 



I can't provide data, it is a live connection to the model.

I appreciate your help.

4 Replies

  • Hi sabd80 

     

    Try creating a new measure that sums the row by row evaluaiton of those period columns.

    SUMX ( VALUES ( 'table'[period column] ), [your measure] )
    
      • danextian's avatar
        danextian
        Icon for Super User rankSuper User

        The SUMX measure i provided is only to evaluate horizontally on the period column being used. It is not supposed to change the total on the total row.