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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Weeknum format customised

Is there a way to customise the Weeknum to display the Month name and then the week number(MM/Weeknum) rather than the continuous week number from 1 - 53?

Ex - Jan - 01, Jan - 02 etc.,?

1 ACCEPTED SOLUTION
v-xiaotang
Community Support
Community Support

Hi @Anonymous 

"to display the Month name and then the week number(MM/Weeknum) rather than the continuous week number from 1 - 53", in this scenario, you can try this, create the column below

 

Custom MMWeek = 
var _days= CALCULATE(COUNTROWS('Calendar'),FILTER(ALL('Calendar'), 'Calendar'[Year]=EARLIER('Calendar'[Year]) && 'Calendar'[Month]=EARLIER('Calendar'[Month]) && 'Calendar'[Date]<=EARLIER('Calendar'[Date])))
var _customWeek=ROUNDDOWN( DIVIDE(_days-1,7),0)+1
return FORMAT('Calendar'[Date],"mmm")&"-"&_customWeek

 

result

vxiaotang_0-1652338733292.png

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-xiaotang
Community Support
Community Support

Hi @Anonymous 

"to display the Month name and then the week number(MM/Weeknum) rather than the continuous week number from 1 - 53", in this scenario, you can try this, create the column below

 

Custom MMWeek = 
var _days= CALCULATE(COUNTROWS('Calendar'),FILTER(ALL('Calendar'), 'Calendar'[Year]=EARLIER('Calendar'[Year]) && 'Calendar'[Month]=EARLIER('Calendar'[Month]) && 'Calendar'[Date]<=EARLIER('Calendar'[Date])))
var _customWeek=ROUNDDOWN( DIVIDE(_days-1,7),0)+1
return FORMAT('Calendar'[Date],"mmm")&"-"&_customWeek

 

result

vxiaotang_0-1652338733292.png

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

ghoshabhijeet
Solution Supplier
Solution Supplier

@Anonymous  You can try this:

ghoshabhijeet_0-1652098947345.png

 

Arul
Super User
Super User

@Anonymous ,

 

try this one,

Monthweek = FORMAT(financials[Date],"MMM")&"-"&FORMAT(financials[Date],"ww")

Arul_0-1652098721586.png

Thanks,

Arul





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


speedramps
Super User
Super User

It is best practice to use a Calendar table. Dont attempt to create your own DAX date logic.
Create a Calendar once with a date and MM/Weeknum column and use it always.

see https://youtu.be/BtYn1hfdSAM

 

 

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors