Dear all, I want to calculate an XYZ Analysis. This works quite fine, but in months where I do not sell a Artikel I do not have an entry conected to a date as it is not sold. But for my analysis I want this month to be counted with zero so that it is included into my Standard Deviation as well as in my average calculation. I was trying to circumvent the problem by matching the Artikel to a clalendar.
XYZ Variation =
VAR CalcTable =
ADDCOLUMNS(
CROSSJOIN(
SUMMARIZE('Calendar', 'Calendar'[Year & Month (YYYY-MM)]),
SUMMARIZE('Umsatz', 'Umsatz'[Artikel])
),
"QuantityByMonth",
CALCULATE(
SUMX(
Umsatz,
COALESCE(Umsatz[UmsatzStück], 0)
),
FILTER(
Umsatz,
Umsatz[Artikel] = EARLIER(Umsatz[Artikel]) &&
YEAR(Umsatz[Zeit_Tag]) = LEFT(EARLIER('Calendar'[Year & Month (YYYY-MM)]), 4) &&
MONTH(Umsatz[Zeit_Tag]) = RIGHT(EARLIER('Calendar'[Year & Month (YYYY-MM)]), 2)
)
)
)
VAR Variation =
DIVIDE(
STDEVX.P(CalcTable, [QuantityByMonth]),
AVERAGEX(CalcTable, [QuantityByMonth])
)
Thank you all in advance!