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
dcg38524
Helper III
Helper III

Cumulative Count by Week of Year

Hello Forum members,

 

I am new to Power BI reporting & creating DAX formulas to produce some reporting.   With that said we would like to create a Cumulative stack column chart based on weekly progress using column “Class” as legend, “Week of Year” on the Axis and value based on “ID ” row count in Implementation table.

 

I've search similar Cumulative examples posted within this forum but unlucky for me those solutions found does not seems to work for my situation.

 

Any help or advice would be greatly appreciated,

 

Thanks you

Don

 

IDClassSCHEDULED_END_DATEWeek of YearYear
61488Approved9/11/2019 0:00372019
61381Rejected10/13/2019 0:00422019
61485Hold3/10/2019 0:00112019
61345Standard1/17/2019 0:0032019
61683Normal11/20/2019 0:00472019
61551Normal8/3/2019 0:00312019
61482Normal12/26/2019 0:00522019
61352Expedited9/13/2019 0:00372019
61678Emergency6/24/2019 0:00262019
61689Expedited12/1/2019 0:00492019
61590Emergency9/15/2019 0:00382019
61360Expedited10/13/2019 0:00422019
61690Approved10/16/2019 0:00422019
61698Rejected12/8/2019 0:00502019

 

2 ACCEPTED SOLUTIONS
v-lid-msft
Community Support
Community Support

Hi @dcg38524 ,

 

We can try to use this measure as the value field.

 

value =
COUNTROWS (
    FILTER (
        ALL ( 'Table' ),
        [Week of Year] <= MAX ( 'Table'[Week of Year] )
            && [Class] IN FILTERS ( 'Table'[Class] )
    )
)

 

2.PNG


If it doesn't meet your requirement, Please show the exact expected result based on the Tables that you have shared.

 

BTW, pbix as attached.

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
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

Dong Li, thank you very much your solution worked great the first time - I would not have been able too resolved this issue without your help & this forum.

 

Best regards,

Don

View solution in original post

3 REPLIES 3
v-lid-msft
Community Support
Community Support

Hi @dcg38524 ,

 

We can try to use this measure as the value field.

 

value =
COUNTROWS (
    FILTER (
        ALL ( 'Table' ),
        [Week of Year] <= MAX ( 'Table'[Week of Year] )
            && [Class] IN FILTERS ( 'Table'[Class] )
    )
)

 

2.PNG


If it doesn't meet your requirement, Please show the exact expected result based on the Tables that you have shared.

 

BTW, pbix as attached.

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Dong Li, thank you very much your solution worked great the first time - I would not have been able too resolved this issue without your help & this forum.

 

Best regards,

Don

Greg_Deckler
Super User
Super User

See if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...

 

Also, I have written a bunch of week based quick measures:

https://community.powerbi.com/t5/forums/searchpage/tab/message?advanced=false&allow_punctuation=fals...

 

You also might find Sequential useful:

https://community.powerbi.com/t5/Quick-Measures-Gallery/Sequential/m-p/380231?search-action-id=87631...


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.