Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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.