Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello Power BI Community,
I'm working on a table visual in Power BI that displays an opening balance column. I've set up a period slicer ranging from 1 to 12. Currently, when I select multiple periods from the slicer, the table visual shows the cumulative total of the opening balance column across all selected periods. For instance, selecting periods 1 and 2 displays the total for both periods combined.
However, I would like the table visual to show the cumulative total up to the lowest selected period number instead. For example, if I select periods 1, 3, 4, and 6, I want it to display the cumulative total only up to period 4.
Could someone please assist me with writing a DAX measure that achieves this behavior? I appreciate any guidance or insights you can provide.
While this works for individual periods, when I am selecting multiple periods or random periods from slicer it is giving me cumulative total in the opening balance column.
For example when I select Period_01, Period_02 and Period_03, it is giving the cumulative value of Bal_Beg_Acct that is 90, but it should be 60.
Thank you!
CumulativeSalesUpToPreviousPeriod =
VAR LowestSelectedPeriod = MIN('PeriodTable'[PeriodNumber])
VAR PreviousPeriod = LowestSelectedPeriod - 1
VAR CumulativeTotalUpToPreviousPeriod =
CALCULATE(
SUM('YourTable'[Sales]),
FILTER(
ALL('PeriodTable'),
'PeriodTable'[PeriodNumber] <= PreviousPeriod
)
)
RETURN
IF(PreviousPeriod > 0, CumulativeTotalUpToPreviousPeriod, 0)
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 6 | |
| 5 | |
| 5 |
| User | Count |
|---|---|
| 24 | |
| 11 | |
| 9 | |
| 9 | |
| 8 |