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

number of the week in the month, starting on Thursday

Hi.

I have a DCalendar table with a field to identify the day of the week in the month.
I need her to start counting the week from Thursday.

Example S1 from December 2020 (days 1, 2 and 3) - S2 (from 4 to 10) and so on!

Can anyone help me do the DAX for this?

 

 
 

sem.png

 

1 ACCEPTED SOLUTION
Payeras_BI
Solution Sage
Solution Sage

Hi @Anonymous ,

 

I believe from your screenshot you want you week to start on Friday (04/12/2020).

 

Two different options:

 

- Power Query Editor --> Date.WeekOfMonth

 

Payeras_BI_0-1611300391761.png

 

 

 

 

 

 

 

- Calculated column in DAX:

 

Payeras_BI_1-1611301394295.png

 

 

Regards,

If this post answered your question, please mark it as a solution to help other users find useful content.
Kudos are another nice way to acknowledge those who tried to help you.

J. Payeras
Mallorca, Spain

View solution in original post

4 REPLIES 4
Payeras_BI
Solution Sage
Solution Sage

Hi @Anonymous ,

 

I believe from your screenshot you want you week to start on Friday (04/12/2020).

 

Two different options:

 

- Power Query Editor --> Date.WeekOfMonth

 

Payeras_BI_0-1611300391761.png

 

 

 

 

 

 

 

- Calculated column in DAX:

 

Payeras_BI_1-1611301394295.png

 

 

Regards,

If this post answered your question, please mark it as a solution to help other users find useful content.
Kudos are another nice way to acknowledge those who tried to help you.

J. Payeras
Mallorca, Spain
Anonymous
Not applicable

Dear Payeras_BI

Thank you for your feedback and time in doing the example.

It was just what I needed.

I'm new to powerquery and DAX, I did a lot of research before posting on the forum and was not getting it.
I will study the commands that you put.

StefanoGrimaldi
Resident Rockstar
Resident Rockstar

hey, 

you could add a new column with some nested ifs, 

new column = if(weekday(date) = 5, "S2",if(weekday(date) = 6,"S2",... and so on

number 5 of the week its thursday

if this helped or resolve your problem give some kudos and mark as solutions for others to find. 





Did I answer your question? Mark my post as a solution! / Did it help? Give some Kudos!

Proud to be a Super User!




Anonymous
Not applicable

hello StefanoGrimaldi

Thanks for the feedback, but I didn't understand how to apply it.
Can you set up an example?

if you put S2 for every number 5 every Thursday will be S2 and that's not what I need.

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

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.