Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

HOW TO SHOW WEEKNUMBER PER PERIOD ?

1 PERIOD CONTAION 4 WEEKS  I NEED WEEKNUMBER TO RESET EACH PERIOD 

THANKS

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

According to your description, you want to group by period and sort by week number.

Here's my solution.

Sample data.

vstephenmsft_0-1639552229237.png

 

Create a calculated column.

WeekNum = RANKX(FILTER('Table',[Period]=EARLIER('Table'[Period])),WEEKNUM([Date],2),,ASC,Dense)

vstephenmsft_1-1639552251716.png

 

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.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @Anonymous ,

 

According to your description, you want to group by period and sort by week number.

Here's my solution.

Sample data.

vstephenmsft_0-1639552229237.png

 

Create a calculated column.

WeekNum = RANKX(FILTER('Table',[Period]=EARLIER('Table'[Period])),WEEKNUM([Date],2),,ASC,Dense)

vstephenmsft_1-1639552251716.png

 

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

Anonymous
Not applicable

 Hi,

 

Please try using below Dax

WeekNum = WEEKNUM('Table'[Period])

WeekNum.JPG

 

Anonymous
Not applicable

it works but i need week num to reset each period.

How about MOD ( WEEKNUM, 4 )?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.