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.
Hello,
I am creating weely reports for which I Week Duration which is calculated by Start Date and End Date of the week. This the formula I am using
WEEK DURATION = vRCCLCOMBINED[START DATE] & " - " & vRCCLCOMBINE[END DATE]
START DATE:
START DATE = FORMAT ( ( vRCCLCOMBINED[START TIME] - WEEKDAY ( vRCCLCOMBINED[START TIME], 1 ) + 1 ), "MM/DD/YYYY" )
END DATE:
END DATE = FORMAT ( ( vRCCLCOMBINED[START TIME] - WEEKDAY ( vRCCLCOMBINED[START TIME], 1 ) + 7 ), "MM/DD/YYYY" )
Now here is not the issue, but where I want to make changes is in case when Start of the year is with in the week.
Say for example, 01/01/2018 it starts on Monday so I want the START DATE 01/01/2018 and END DATE 01/06/2018. But for following week START DATE 01/07/2018 and END DATE 01/13/2018
Similary for last week of year 2017 should have START DATE 12/31/2018 and END DATE 12/31/2018
So the Output will look like below:
START DATE | END DATE | WEEK DURATION | -----------|-----------|------------------------| 12/24/2017 |12/30/2017 |12/24/2017 - 12/30/2017 | 12/31/2017 |12/31/2017 |12/31/2017 - 12/31/2017 | 01/01/2018 |01/06/2018 |01/01/2018 - 01/06/2018 | 01/07/2018 |01/13/2018 |01/07/2018 - 01/13/2018 |
Thanks
Abdulquadir
Solved! Go to Solution.
You should be able to easily modify the quick measures that I have here for this:
https://community.powerbi.com/t5/Quick-Measures-Gallery/First-Last-Working-Days/m-p/391545
Week Start & End Date From Date Dax Formula
WeekStartDate = [DateColumn] - (WEEKDAY([DateColumn])-1)
WeekEndDate = [DateColumn] + (7-WEEKDAY([DateColumn]))
You should be able to easily modify the quick measures that I have here for this:
https://community.powerbi.com/t5/Quick-Measures-Gallery/First-Last-Working-Days/m-p/391545
Did you get this sorted out?
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 |
---|---|
117 | |
104 | |
77 | |
73 | |
52 |
User | Count |
---|---|
145 | |
109 | |
108 | |
90 | |
64 |