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.
Hi, as you can see from the screenshot below, I have a "SCHEDULED_FROM" column, is it possible I could create a new column which only displays the first day (Monday) of that week? i.e. if the date is 27/10/2020, could i convert it to 26/10/2020.
Solved! Go to Solution.
@Anonymous
New Column = CALCULATE(MAX([SCHEDULED_FROM]),FILTER('Table',WEEKDAY([SCHEDULED_FROM],2)=1 && 'Table'[SCHEDULED_FROM]<=EARLIER([SCHEDULED_FROM])))
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
@Anonymous
New Column = CALCULATE(MAX([SCHEDULED_FROM]),FILTER('Table',WEEKDAY([SCHEDULED_FROM],2)=1 && 'Table'[SCHEDULED_FROM]<=EARLIER([SCHEDULED_FROM])))
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
HI @Anonymous
I would use the below code
'Table'[SCHEDULED_FROM] - WEEKDAY('Table'[SCHEDULED_FROM],2)+1
Hope it resolves your issue? Did I answer your question? Mark my post as a solution! Appreciate your Kudos, Press the thumbs up button!! Linkedin Profile |
Hi @Anonymous ,
Check out THIS THREAD.
@TomMartens gives a perfect walkthrough for DAX.
Alternatively, you can use the Date.StartOfWeek() function in Power Query, where the second argument is where you would specify that Monday was your start-of-week day.
Pete
Proud to be a Datanaut!
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 |
---|---|
111 | |
97 | |
80 | |
69 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |