Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi @Anonymous ,
According to your description, you want to group by period and sort by week number.
Here's my solution.
Sample data.
Create a calculated column.
WeekNum = RANKX(FILTER('Table',[Period]=EARLIER('Table'[Period])),WEEKNUM([Date],2),,ASC,Dense)
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
According to your description, you want to group by period and sort by week number.
Here's my solution.
Sample data.
Create a calculated column.
WeekNum = RANKX(FILTER('Table',[Period]=EARLIER('Table'[Period])),WEEKNUM([Date],2),,ASC,Dense)
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This very helpful but would you be able to help with for some the periods the weeknum starts from 2 instead of 1
Hi,
Please try using below Dax
WeekNum = WEEKNUM('Table'[Period])
it works but i need week num to reset each period.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 14 | |
| 7 | |
| 4 | |
| 4 | |
| 3 |
| User | Count |
|---|---|
| 23 | |
| 10 | |
| 10 | |
| 6 | |
| 5 |