Forum Discussion
Running total calculation without filter?
Hi All,
I created a running total calculation which counts from a start balance. The start balance contains the actual stock quantity, stock input output quantity before the actual month + actual month quantity.
Please, see this PBI file link for more details: RunningTotalWithCalendar
My problem is that the "0BeforeActual" column is not visible in visualization because of the applied filter, as you can see on the picture below.
The first visualization shows the start balance calculation and the second one shows the running total
Running total measure
m_StockIORunningTotal =
CALCULATE(
[m_StockIODiffForRunningTotal],
FILTER(
ALLSELECTED('Calendar'[0BeforeActualYearMonth]),
'Calendar'[0BeforeActualYearMonth] >= [m_ActualMonth] && 'Calendar'[0BeforeActualYearMonth] <= max('Calendar'[0BeforeActualYearMonth]))
)Is there any way to create running total calculation without filtering the "0BeforeActual" column?
Thank you in advance!
OK I think I found it, add "<" to this measure
Looking good!
13 Replies
- aj1973Community Champion
- EnderWigginHelper I
Hey aj1973 ,
thank you for your fast reply! I tried it, but the running total calculation does not work on this way (as it can be seen on the picture you shared)
m_StockIORunningTotal1 = var StockIODiff = [m_StockIODiffForRunningTotal] var RT = CALCULATE( StockIODiff, FILTER( ALLSELECTED('Calendar'[0BeforeActualYearMonth]), 'Calendar'[0BeforeActualYearMonth] >= [m_ActualMonth] && 'Calendar'[0BeforeActualYearMonth] <= max('Calendar'[0BeforeActualYearMonth])) ) return RT- aj1973Community Champion
Your exact measure is working for me
here is the file
https://drive.google.com/file/d/1a1tcHD3KlIr6UBf32c5BizA1qYttDMCO/view?usp=sharing