Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi Team,
I have date column in Power BI which shows every Monday of the week, Now I wanted to create a column which will show June Week 1, June Week 2 ... December Week 1.
If i use Weeknum then it is giving me numbers from 1 to 53 which i dont want.
Could you please help me resolve it.
Thanks,
Shubham
Solved! Go to Solution.
@Anonymous
Add this as a new column
Month-Week =
VAR _DAY = DAY([Date]) RETURN
SWITCH( TRUE(),
_DAY >= 1 && _DAY <= 7, "Week 1",
_DAY >= 8 && _DAY <= 14, "Week 2",
_DAY >= 15 && _DAY <= 21, "Week 3",
_DAY >= 22 && _DAY <= 28, "Week 4",
"Week 5"
)
________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@Anonymous
Add this as a new column
Month-Week =
VAR _DAY = DAY([Date]) RETURN
SWITCH( TRUE(),
_DAY >= 1 && _DAY <= 7, "Week 1",
_DAY >= 8 && _DAY <= 14, "Week 2",
_DAY >= 15 && _DAY <= 21, "Week 3",
_DAY >= 22 && _DAY <= 28, "Week 4",
"Week 5"
)
________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
hi @Anonymous - you can create a calucalated column in your date table as shown below
Proud to be a Super User!
Thanks for the reply. But in this case, in february it will show February Week 5 , i dont want that, for every new month counting should start from Week 1.
Thanks,
Shubham
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
136 | |
117 | |
101 | |
71 | |
61 |