This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hello everyone. I have a cumulative sum measure looks like below. It works fine. However, it only starts accumulating starting the start date on the date slicer. For example, if a store oepned and started having sales in 2015, it only accumulates starting 2018 if the date slicer is selected to start at 2018. I want it to accumulate starting the first possible date in the DimDate table no matter how date slicer is selected. How can I work around this? Thanks in advance!
# Running Total Count =
CALCULATE(
SUM(SalesTable[Count]),
FILTER(
ALLSELECTED(SalesTable),
SalesTable[SaleDate]<=MAX(DimDate[Date])
)
)
Solved! Go to Solution.
@Jihwan_Kim @Greg_Deckler Thank you both for your help. I got it working with the following.
CALCULATE(
SUM(SalesTable[Count]),
ALL(DimDate),
FILTER(
ALLSELECTED(SalesTable[SaleDate]),
SalesTable[SaleDate]<=MAX(DimDate[Date])
)
)
Hi,
Instead of using ALLSELECTED, please try using ALL, and check if it suits your requirement.
Thanks.
Hi @Jihwan_Kim, thank you for the quick reply. I had tried All, but with All, it calculates for all stores and ignores the store filter. I do want to keep the ability to calculate for only selected store.
@DataSundowner Try this approach: (1) Better Running Total - Microsoft Power BI Community
I changed it to the following. Looks like it's doing the same thing as my original formula. It only starts accumulating starting the start date on date slicer.
# Running Total Count =
VAR _maxDate = MAX(DimDate[Date])
VAR _table = FILTER(ALLSELECTED(SalesTable), SalesTable[SaleDate]<=_maxDate)
RETURN
SUMX(_table, SalesTable[Count])
@Jihwan_Kim @Greg_Deckler Thank you both for your help. I got it working with the following.
CALCULATE(
SUM(SalesTable[Count]),
ALL(DimDate),
FILTER(
ALLSELECTED(SalesTable[SaleDate]),
SalesTable[SaleDate]<=MAX(DimDate[Date])
)
)
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 27 | |
| 26 | |
| 22 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 45 | |
| 43 | |
| 41 | |
| 21 | |
| 20 |