Я пытаюсь рассчитать совокупные значения. Я попробовал формулы ниже, ни одна из них не сработала.
Cumulative_Forecast = CALCULATE(sum(TEAMS_Forecast_LineItems[ForeCast_Value]),
filter(ALLEXCEPT(TEAMS_Forecast_LineItems,TEAMS_Forecast_LineItems[ForeCast_Year]),
TEAMS_Forecast_LineItems[MonthNumber]<=EARLIER(TEAMS_Forecast_LineItems[MonthNumber])))
Cumulative_Forecast2 = VAR RowDate = TEAMS_Forecast_LineItems[Forecast_Date]
return CALCULATE(sum(TEAMS_Forecast_LineItems[ForeCast_Value]),
FILTER(TEAMS_Forecast_LineItems, TEAMS_Forecast_LineItems[Forecast_Date]
<=RowDate && YEAR ( TEAMS_Forecast_LineItems[Forecast_Date] ) = YEAR ( RowDate )))
Cumulative_Forecast3 = TOTALYTD(sum(TEAMS_Forecast_LineItems[ForeCast_Value]),
'Calendar'[Date])
Cumulative_Forecast4 = CALCULATE(sum(TEAMS_Forecast_LineItems[ForeCast_Value]),
filter(ALL(DimDate[Date]), DimDate[Date] <= Max(DimDate[Date])) )
Вот несколько примеров записей:
ForeCast_Value Month MonthNumber ForeCast_BU ForeCast_Year ForeCast_ID
71100 Sep 9 Business1 2018 10648
71100 Oct 10 Business1 2018 10648
81000 Sep 9 Business1 2018 10649
71200 Sep 9 Business2 2018 10700
80500 Sep 9 Business2 2017 10500
80600 Oct 10 Business2 2017 10500
81100 Sep 9 Business2 2018 10650
У меня есть линейный график; Месяц по оси, БУ по легенде и значение по значениям.
Когда выбран год нарезки
Business 1= 152100 and Business 2 =232800 on September
Business 1= 71100 and Business 2 =80600 on October
Когда выбран год нарезки 2017
Business 2=80600 on Sep
Business 2=80500 on Oct
Я хочу создать новую линейную диаграмму для совокупных значений. Желаемые значения:
Когда выбран год среза
Business 1= 152100 and Business 2 =232800 on September
Business 1= 223200 and Business 2 =313400 on October
Когда выбран год нарезки = 2017
Business 2=80600 on Sep
Business 2=161100 on Oct