Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Good day all,
I have a report that will only be updated on Mondays. Currently, I have a column created with the following:
Solved! Go to Solution.
In case, you want to get last Monday every time.
1. Try taking the max of Last update date into a Var. Ideally, it should give Max date of data
2. Take Weekend in a Var use it.
Calculate(max(weekend_date),ddate<today)
3. Monday has WeekDay 2. If Today is more than that or 1 then adjust
if(WEEKDAY(Today())<>2, Today()-WEEKDAY(Today())+2,WEEKDAY(Today())
Need to handle when it is 1
Hey,
maybe you find this useful: https://community.powerbi.com/t5/Desktop/Week-commencing-in-DAX/m-p/241304
I can imagine that you create a column that will always have the date of the last Monday, regardless when the report will be used.
Regards,
Tom
Thanks Tom.
I have a EoW and SoW in both my Date table and tried it inside the source table itself, just to eliminate any relational issues. I replaced the Today call with the End of WEEK fields and don't get the expected results.
Suggestions on how I would call those fields within a column such as in my formula above?
In case, you want to get last Monday every time.
1. Try taking the max of Last update date into a Var. Ideally, it should give Max date of data
2. Take Weekend in a Var use it.
Calculate(max(weekend_date),ddate<today)
3. Monday has WeekDay 2. If Today is more than that or 1 then adjust
if(WEEKDAY(Today())<>2, Today()-WEEKDAY(Today())+2,WEEKDAY(Today())
Need to handle when it is 1
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |