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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Nicolas_L
New Member

Measure to give the cumulative week index of a month

I'm not sure how to word this, in short:

 

In 2018

Week 31 is the first week of August = 1

Week 32 is the second week of August = 2

..

..

Week 35 is the fith week of August = 5

Week 46 is the third week of November =3

 

 

Heres a screenshot example:

 

Capture.JPG

I'm able to do this on a simple pivot table by having Distinct Count of Week Number as values and summarize it as a running total, Can this be done as a DAX measure instead?

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@Nicolas_L,

 

You may try the following measure.

Measure =
MAX ( Table1[Week Number] )
    - CALCULATE ( MIN ( Table1[Week Number] ), ALLSELECTED ( Table1[Week Number] ) )
    + 1
Community Support Team _ Sam Zha
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

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@Nicolas_L,

 

You may try the following measure.

Measure =
MAX ( Table1[Week Number] )
    - CALCULATE ( MIN ( Table1[Week Number] ), ALLSELECTED ( Table1[Week Number] ) )
    + 1
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Works perfectly. thank you very much

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.