Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

Running total for different ids for the months not having any data

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.

 

 

 

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

I suggest having a calendar table, and data model structure like below.

All measures are in the sample pbix file (link down below).

 

Picture1.png

 

Link to the sample pbix file 

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

3 REPLIES 3
Jihwan_Kim
Super User
Super User

Hi,

I suggest having a calendar table, and data model structure like below.

All measures are in the sample pbix file (link down below).

 

Picture1.png

 

Link to the sample pbix file 

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
Anonymous
Not applicable

Thank you. It worked. Appericiate your help.

amitchandak
Super User
Super User

@Anonymous , 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])))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.