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.
I need to calculate a month on month (MOM) of a measure, Error Percentage. This works only if I use the data from the Error-table itself, but I'd like to use the related Calender table. If not, filtering on a reportpage doesn't work.
The error-table and the calendertable are linked using a data as an integer.
Any help would be great.
So this works:
Error % MOM % =
VAR Prev =
CALCULATE(AVERAGE(ErrorTotalsMonth[Error % (EOM)]); DATEADD(ErrorTotalsMonth[Date End Of Month]; -1; MONTH))
VAR Cur =
CALCULATE(AVERAGE(ErrorTotalsMonth[Error % (EOM)]))
VAR Result =
DIVIDE((Cur-Prev); Prev; 0)
RETURN IF(NOT(Cur = BLANK()); Result; BLANK())
But this doesn't:
Error % MOM % =
VAR Prev =
CALCULATE(AVERAGE(ErrorTotalsMonth[Error % (EOM)]); DATEADD(_CalenderTable[Date]; -1; MONTH))
VAR Cur =
CALCULATE(AVERAGE(ErrorTotalsMonth[Error % (EOM)]))
VAR Result =
DIVIDE((Cur-Prev); Prev; 0)
RETURN IF(NOT(Cur = BLANK()); Result; BLANK())
Hi @Wisselaar ,
Is there a relationship between your calendar table and error-table?
After you create a relationship, you can filter the dates in the calendar table.
For more information, you can kindly refer to:
https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-create-and-manage-relationships
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Wisselaar , are you taking Date end of month column from _calendatTable, If not use from there.
Also, try a formula like the one given below as in the example
MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last month Sales = CALCULATE(SUM(Sales[Sales Amount]),previousmonth('Date'[Date]))
this month =MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH('Date'[Date])))
last MTD (complete) Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-1,MONTH))))
previous month value = CALCULATE(sum('Table'[total hours value]),previousmonth('Date'[Date]))
User | Count |
---|---|
93 | |
86 | |
78 | |
72 | |
66 |
User | Count |
---|---|
115 | |
106 | |
85 | |
65 | |
64 |