Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi all,
I'm in trouble to a standard deviation calculation (last 12 months) as my measure give me a results different from excel, so I would debug the formula.
The formula start with
STD:=
VAR LastMonthID =
MAX ( 'Calendar'[MonthID] )
VAR FirstMonthID = LastMonthID - 11
VAR Months =
FILTER (
ALL ( 'Calendar'[MonthID] );
'Calendar'[MonthID] >= FirstMonthID
&& 'Calendar'[MonthID] <= LastMonthID
)
VAR MOnthlyQty =
ADDCOLUMNS ( Months; "Qty"; [Total_Case] +0)
FirstMonthID and LastMOnth ID works well but I'm not able to refer to column Qty to check if it's all correct.
Do you have any suggestion?
Thanks in advance
Antonio
Solved! Go to Solution.
You could use CONCATENATEX to see a list of each of the [Qty].
STD :=
VAR LastMonthID =
MAX ( 'Calendar'[MonthID] )
VAR FirstMonthID = LastMonthID - 11
VAR Months =
FILTER (
ALL ( 'Calendar'[MonthID] );
'Calendar'[MonthID] >= FirstMonthID
&& 'Calendar'[MonthID] <= LastMonthID
)
VAR MOnthlyQty =
ADDCOLUMNS ( Months; "Qty"; [Total_Case] + 0 )
RETURN
CONCATENATEX ( MOnthlyQty; [Qty]; "," )
You could use CONCATENATEX to see a list of each of the [Qty].
STD :=
VAR LastMonthID =
MAX ( 'Calendar'[MonthID] )
VAR FirstMonthID = LastMonthID - 11
VAR Months =
FILTER (
ALL ( 'Calendar'[MonthID] );
'Calendar'[MonthID] >= FirstMonthID
&& 'Calendar'[MonthID] <= LastMonthID
)
VAR MOnthlyQty =
ADDCOLUMNS ( Months; "Qty"; [Total_Case] + 0 )
RETURN
CONCATENATEX ( MOnthlyQty; [Qty]; "," )
Thank you very much. Now it works.