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
brizzdizz
Frequent Visitor

Running total chart that does not reset for each calendar year

Hello, I have a line & clustered column chart that has a running total measure applied to it. The running total resets back to 0 at the beginning of each year. I'm trying to get the running total to not reset and calculate the running total for the entirety of the data but am not having any luck.

 

In the screenshot you can see where my running total drops from 308 in 2021 December to 9 in 2022 January. I'd like 2022 January to be 317.

 

brizzdizz_0-1655404532027.png

 

This is sample data where I expect 2020 December to be 2 and 2021 January to be 6:

PO NumberRevisionIssue Date
AR15733115-Dec-20
BR63777110-Dec-20
CH3733335-Jan-21
JW5256013-Jan-21
RB662236-Jan-21
RB6622422-Jan-21

 

This is the measure I'm currently using:

Cumulative PO Revisions =
CALCULATE(
    COUNTA('q50183 PO Commitment by Revision'[Revision]),
    FILTER(
        CALCULATETABLE(
            SUMMARIZE(
                'q50183 PO Commitment by Revision',
                'q50183 PO Commitment by Revision'[Issue Date].[MonthNo],
                'q50183 PO Commitment by Revision'[Issue Date].[Month]
            ),
            ALLSELECTED('q50183 PO Commitment by Revision')
        ),
        ISONORAFTER(
            'q50183 PO Commitment by Revision'[Issue Date].[MonthNo], MAX('q50183 PO Commitment by Revision'[Issue Date].[MonthNo]), DESC,
            'q50183 PO Commitment by Revision'[Issue Date].[Month], MAX('q50183 PO Commitment by Revision'[Issue Date].[Month]), DESC
        )
    )
)
1 ACCEPTED SOLUTION
v-rzhou-msft
Community Support
Community Support

Hi @brizzdizz ,

 

I suggest you to try to create a DimDate table and then create measures to count revision and cumulative revision.

DimDate = 
ADDCOLUMNS (
    CALENDAR (
        EOMONTH ( MIN ( 'q50183 PO Commitment by Revision'[Issue Date] ), -1 ) + 1,
        EOMONTH ( MAX ( 'q50183 PO Commitment by Revision'[Issue Date] ), 0 )
    ),
    "Year", YEAR ( [Date] ),
    "Month", MONTH ( [Date] ),
    "MonthName", FORMAT ( [Date], "MMMM" )
)

Relationship:

RicoZhou_0-1655690759024.png

Measures:

Count PO Revisions = 
COUNT ( 'q50183 PO Commitment by Revision'[Revision] )
Cumulative PO Revisions = 
SUMX (
    FILTER ( ALL ( DimDate ), DimDate[Date] <= MAX ( DimDate[Date] ) ),
    [Count PO Revisions]
)

Result is as below.

RicoZhou_1-1655690833741.png

 

Best Regards,
Rico Zhou

 

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-rzhou-msft
Community Support
Community Support

Hi @brizzdizz ,

 

I suggest you to try to create a DimDate table and then create measures to count revision and cumulative revision.

DimDate = 
ADDCOLUMNS (
    CALENDAR (
        EOMONTH ( MIN ( 'q50183 PO Commitment by Revision'[Issue Date] ), -1 ) + 1,
        EOMONTH ( MAX ( 'q50183 PO Commitment by Revision'[Issue Date] ), 0 )
    ),
    "Year", YEAR ( [Date] ),
    "Month", MONTH ( [Date] ),
    "MonthName", FORMAT ( [Date], "MMMM" )
)

Relationship:

RicoZhou_0-1655690759024.png

Measures:

Count PO Revisions = 
COUNT ( 'q50183 PO Commitment by Revision'[Revision] )
Cumulative PO Revisions = 
SUMX (
    FILTER ( ALL ( DimDate ), DimDate[Date] <= MAX ( DimDate[Date] ) ),
    [Count PO Revisions]
)

Result is as below.

RicoZhou_1-1655690833741.png

 

Best Regards,
Rico Zhou

 

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

 

lbendlin
Super User
Super User

Shouldn't January 2021 be 12?

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.