Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello everyone,
juste before i stard, i searched before i post this and i could not find the same problem as me.
i am comparing each week the evolution of the turnover, and then i compare it to the budget.
Also i compare the actual MTD values.
my expression:
MTD:=CALCULATE([sales];DATESMTD(Sales[Date]))
It is working fine alone, but when i am comparing by week it's not working well because some weeks on based on two different month. My formula should take the last date of previous month when there is two month in a same week.
Exemple :
You can see on my example that for the week 4, the mtd value is for march but it should be februar.
I need a mtd value where it always take the last day of previous month when there are two different month in a week.
I hope you can help me.
Thank you in advance
Solved! Go to Solution.
Hello,
No it doesn't work ufortunately.
Hopefully i resolved my problems by myself Here is the solution if people have the same issue.
(1)calculate the first day of the week using the function "FIRSTDATE"
(2)Then you calcultate the last day of the week (1) + 6
(3) You use a if function to now if the month number of 1 and 2 are equal, if month are equal you can use the calculated lastday (2), if not you have to find the lastday of month (1) with this formula DATE(YEAR((1));MONTH((1)+1;1)-1.
Finally you calculate the expression and for the filter you take datesbetween( firstdate(1);Lastdate(3)
Hi @ton-v ,
How about using FILTER() function and MonthNo to filter out specified month?
Best Regards,
Jay
Community Support Team _ Jay Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello,
No it doesn't work ufortunately.
Hopefully i resolved my problems by myself Here is the solution if people have the same issue.
(1)calculate the first day of the week using the function "FIRSTDATE"
(2)Then you calcultate the last day of the week (1) + 6
(3) You use a if function to now if the month number of 1 and 2 are equal, if month are equal you can use the calculated lastday (2), if not you have to find the lastday of month (1) with this formula DATE(YEAR((1));MONTH((1)+1;1)-1.
Finally you calculate the expression and for the filter you take datesbetween( firstdate(1);Lastdate(3)
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
84 | |
83 | |
64 | |
61 | |
55 |
User | Count |
---|---|
171 | |
109 | |
109 | |
73 | |
71 |