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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Accumulate values by several dimensions

Hello data warriors! 

I've been trying to solve a problem that is  using a measure that accumulates revenue based on month, day and year. Basically I want to use it in a bar chart with drilldowns, each drilldown will change the dimension, so I intend to make the measure adapt to the dimension shown. 

 

This chart below already shows a measure accumulating only by month, I want transform it into these three dimensions I mentioned. 

 

 


printzin.PNG

So I tried using this expression:

 

Accumulated =
CALCULATE(
    [06M - Revenue];
    FILTER(
        CALCULATETABLE(
            SUMMARIZE('Cupom'; 'Cupom'[Month Number]; 'Cupom'[Month Name]; Cupom[Year]; Cupom[Day]);
            ALLSELECTED('Cupom')
        );
        ISONORAFTER(
Cupom[Month Number];MAX(Cupom[Month Number]);DESC;
Cupom[Month Name];MAX(Cupom[Month Name]);DESC;
Cupom[Year];MAX(Cupom[Year]);DESC;
Cupom[Day];MAX(Cupom[Day]);DESC
 
        
 
        )
    )
)



But it didn't bring right values. Can someone give me a guidance? Sorry if I weren't clear enough.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hey @TeigeGao ,

Sorry, what I tried to meant is that the bar chart when the user change the levels of drilldown, it changes based on the dimensions dragged in the object(which is: month, year, day).

I manage to solve that using another measure that makes a decision structure, for instance: 

Month accumulative measure: 

CALCULATE(
    [06M - Revenue];
    FILTER(
        CALCULATETABLE(
            SUMMARIZE('Cupom'; 'Cupom'[Month Number; 'Cupom'[Month Name]);
            ALLSELECTED('Cupom')
        );
        ISONORAFTER(
            'Cupom'[Month Number]; MAX('Cupom'[Month Number]); DESC;
            'Cupom'[Month Name]; MAX('Cupom'[Month Name]); DESC
        )
    )

Year Accumulative Measure: 
CALCULATE(
    [06M - Revenue];
    FILTER(
        ALLSELECTED('Cupom'[Year]);
        ISONORAFTER('Cupom'[Year]; MAX('Cupom'[Year]); DESC)
    )
)
Day Accumalitive Measure:
CALCULATE(
    [06M - Revenue];
    FILTER(
        ALLSELECTED('Cupom'[Day]);
        ISONORAFTER('Cupom'[Day]; MAX('Cupom'[Day]); DESC)
    )
)

So I created this last measure that verifies if inside the drilldown each one is being filtered, so it accumulates based on what the measure calculates:
Accumulative Activation:
F(
ISFILTERED(Cupom[Month Name); [Month Accumulative Measure];
IF(
ISFILTERED(Cupom[Year]);[Year Accumulative Measure];
IF(
ISFILTERED(Cupom[Day]); [Day Accumulative Measure];0)
))
Hope you understand.






View solution in original post

2 REPLIES 2
TeigeGao
Solution Sage
Solution Sage

Hi @Anonymous ,

Could you please share some sample data and expected result to us for analysis? It's sorry that I can't understand your requirement well. 

As you mentioned above, "each drilldown will change the dimension", the filter cannot change the dimension, it can only filter data in this dimension.

Best Regards,

Teige

Anonymous
Not applicable

Hey @TeigeGao ,

Sorry, what I tried to meant is that the bar chart when the user change the levels of drilldown, it changes based on the dimensions dragged in the object(which is: month, year, day).

I manage to solve that using another measure that makes a decision structure, for instance: 

Month accumulative measure: 

CALCULATE(
    [06M - Revenue];
    FILTER(
        CALCULATETABLE(
            SUMMARIZE('Cupom'; 'Cupom'[Month Number; 'Cupom'[Month Name]);
            ALLSELECTED('Cupom')
        );
        ISONORAFTER(
            'Cupom'[Month Number]; MAX('Cupom'[Month Number]); DESC;
            'Cupom'[Month Name]; MAX('Cupom'[Month Name]); DESC
        )
    )

Year Accumulative Measure: 
CALCULATE(
    [06M - Revenue];
    FILTER(
        ALLSELECTED('Cupom'[Year]);
        ISONORAFTER('Cupom'[Year]; MAX('Cupom'[Year]); DESC)
    )
)
Day Accumalitive Measure:
CALCULATE(
    [06M - Revenue];
    FILTER(
        ALLSELECTED('Cupom'[Day]);
        ISONORAFTER('Cupom'[Day]; MAX('Cupom'[Day]); DESC)
    )
)

So I created this last measure that verifies if inside the drilldown each one is being filtered, so it accumulates based on what the measure calculates:
Accumulative Activation:
F(
ISFILTERED(Cupom[Month Name); [Month Accumulative Measure];
IF(
ISFILTERED(Cupom[Year]);[Year Accumulative Measure];
IF(
ISFILTERED(Cupom[Day]); [Day Accumulative Measure];0)
))
Hope you understand.






Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors