Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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?
User | Count |
---|---|
128 | |
108 | |
100 | |
64 | |
62 |
User | Count |
---|---|
136 | |
113 | |
102 | |
71 | |
60 |