Forum Discussion
Wresen
3 years agoPost Patron
Shifting data backwards
Hi and thanks for reading this. I am not sure the title is correct but i was not sure what to call this. I have two tables conected to each other and i have a mesure that calculate the sum for e...
- 3 years ago
OK, the measures you need are:
For + 3 days
+3 day = CALCULATE([Sum], FILTER(ALL(DTable), DTable[DayTable] = MAX(DTable[DayTable]) +3))Values at + 3 or less = CALCULATE ( [Sum], FILTER ( ALL ( DTable[DayTable] ), DTable[DayTable] > MAX ( DTable[DayTable] ) && DTable[DayTable] <= MAX ( DTable[DayTable] ) + 3 ) )Aggregated total at +3 = SUMX(DTable, [Values at + 3 or less])and if you want to display the +3days value at day level and the aggregated total at the total level:
Display at +3 = IF(ISINSCOPE(DTable[DayTable]), [+3 day], [Aggregated total at +3])So, for +18 days, you need:
Values at + 18 or less = CALCULATE ( [Sum], FILTER ( ALL ( DTable[DayTable] ), DTable[DayTable] > MAX ( DTable[DayTable] ) && DTable[DayTable] <= MAX ( DTable[DayTable] ) + 18 ) )Aggregated total at +18 = SUMX(DTable, [Values at + 18 or less])and if you want the +18 day values displayed ate Day level and the total aggragation at the total level:
+18 day = CALCULATE([Sum], FILTER(ALL(DTable), DTable[DayTable] = MAX(DTable[DayTable]) +18))Display at +18 = IF(ISINSCOPE(DTable[DayTable]), [+18 day], [Aggregated total at +18])Sample file attached
PaulDBrown
3 years agoCommunity Champion
My question is: what do you need to display in the final visual? The +3 measure, or does it have to be dynamic based on a value the user selects from a slicer?
Wresen
3 years agoPost Patron
Sorry for the bad explenation .
In the last +3 the total value should be shown (added form +1 ,+2 and +3)