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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
heidibb
Helper IV
Helper IV

Rolling Calculation Help Needed

Hello,

My goal is to get a rolling total for three trimesters and I'm having some trouble. I have Trimester in my data below as well as a trimester sequence, which is formatted as a whole number. Ultimately, I would like a three trimester rolling total on each line. For example, Summer 2017-2018, I would like that to be 3676+3848+4826.

heidibb_0-1725301371821.png

 

I have tried the following, but I can't figure out how to get it to total what I ultimately want. Note that I'm not the best with ALLEXCEPT. Trimester and Sequence comes from one data connection and all the filters on the left of the page come from another. The data model has them joined with a Many to One cardinatlity, Cross-filter direction = Single 

heidibb_1-1725301898395.png

 

 

 

 

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file.

 

Jihwan_Kim_1-1725304129746.png

 

 

Jihwan_Kim_0-1725304042968.png

 

value total: = 
SUM( data_fact[value] )

 

WINDOW function (DAX) - DAX | Microsoft Learn

 

expected result measure: = 
CALCULATE (
    [value total:],
    WINDOW (
        -2,
        REL,
        0,
        REL,
        ALL ( period_dimension[sequence], period_dimension[trimester] ),
        ORDERBY ( period_dimension[sequence], ASC )
    )
)

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

View solution in original post

1 REPLY 1
Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file.

 

Jihwan_Kim_1-1725304129746.png

 

 

Jihwan_Kim_0-1725304042968.png

 

value total: = 
SUM( data_fact[value] )

 

WINDOW function (DAX) - DAX | Microsoft Learn

 

expected result measure: = 
CALCULATE (
    [value total:],
    WINDOW (
        -2,
        REL,
        0,
        REL,
        ALL ( period_dimension[sequence], period_dimension[trimester] ),
        ORDERBY ( period_dimension[sequence], ASC )
    )
)

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

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.