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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
EmilijaN
Helper I
Helper I

Week counter

Hello, 

 

I need help with creating a code to find how many days of the weeks belong to One or another Month.

 

Example:

                                                        New column

1/31/2022 January    week day 1      Feb
2/1/2022   February  week day 2      Feb
2/2/2022   February  week day 3      Feb
2/3/2022   February  week day 4      Feb
2/4/2022   February  week day 5      Feb
2/5/2022   February  week day 6      Feb
2/6/2022   February  week day 7      Feb

 

If there is more than 4 days in the same Month than all that week I need to be in that Month. In the example all this days have to be in February .

 

Any suggestions?

3 REPLIES 3
EmilijaN
Helper I
Helper I

The month that has it more times in a week always wins.  Then the output will be January for whole week.

pls check if this is what you want





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

Proud to be a Super User!




ryan_mayu
Super User
Super User

what if no more than 4 days? what's the output for the first row?





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

Proud to be a Super User!




Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.