Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi folks,
I need to create the running total for different ids for the range of date selected via slicer.
For e.g. I have TableA with below values:
Date Id Name Revenue
01/01/2021 01 Laptop 500
02/02/2021 01 Laptop 300
01/01/2021 02 Chair 200
02/02/2021 02 Chair 300
If there is no data for any month it should return previous running total as shown below. For March and April there is no data but I previous running total is expected. Tried creating one date table and have left outer join but not worked.
Date Id Name RunningRevenue
jan 21 01 Laptop 500
feb 21 01 Laptop 800
mar 21 01 Laptop 800
apr 21 01 Laptop 800
jan 21 02 Chair 200
feb 21 02 Chair 500
mar 21 02 Chair 500
apr 21 02 Chair 500
Waiting for some guidance.
Thanks in Advance.
Solved! Go to Solution.
Hi,
I suggest having a calendar table, and data model structure like below.
All measures are in the sample pbix file (link down below).
Hi,
I suggest having a calendar table, and data model structure like below.
All measures are in the sample pbix file (link down below).
Thank you. It worked. Appericiate your help.
@Milan6687 , Try with date table joined with date of you table, use month from date
calculate(sum(Table[revenue]), filter(allselected('Date'), 'Date'[Date] <= max('Date'[Date])))
or with date and ID table
calculate(sum(Table[revenue]), filter(allselected('Date'), 'Date'[Date] <= max('Date'[Date])), filter(allselected(ID), ID[Id] =max(ID[id])))
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
7 | |
7 | |
6 | |
6 |
User | Count |
---|---|
27 | |
12 | |
10 | |
9 | |
6 |