Forum Discussion
heidibb
1 year agoHelper 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. Ul...
- 1 year ago
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.
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 ) ) )
Jihwan_Kim
1 year agoSuper 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.
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 )
)
)