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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Running total not working when there is 0 in any row

I've created a running total to calculate the running total  of tasks completed each day. It seems to be working ok if the value in the field is not 0, however when the value is 0 it just shows 0 rather than the running total from the previous day. Also I am not sure why it is displaying the same date multiple times.  The screenshot below

1.jpg

The measure I used below

RUNNINGTOTALACTUAL = CALCULATE(
SUM('Tasks'[ActualFinishDateNumber-For S-curve only]),
FILTER(
ALLSELECTED(Tasks),
Tasks[TaskActualFinishDate] <= MAX(Tasks[TaskActualFinishDate])
)
)
Any help would be much appreciated. Thanks
1 ACCEPTED SOLUTION
Stachu
Community Champion
Community Champion

your visual is using only one date of the 3 fields in the axis either the regular finish date or baseline, or actual

in order for this to work you need a separate calendar table with active join with the date field you will use the most, and inactive joins with the rest

you can then activate the inactive joins in the related formula using USERRELATIONSHIP

https://docs.microsoft.com/en-us/dax/userelationship-function-dax



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

View solution in original post

4 REPLIES 4
Stachu
Community Champion
Community Champion

Can you add sample tables (in format that can be copied to PowerBI) from your model with anonymised data? Like this (just copy and paste into the post window).

Column1 Column2
A 1
B 2.5

it may be related that you use Tasks[TaskActualFinishDate] in the formula and show [TaskFinishDate] in the visual, but without looking at the data it's really hard to judge



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Anonymous
Not applicable

Thanks for you help I think that was the reason i've resolved that issue by changing the field from Actual Finish date to Finish Date now all fields are referencing the same date field and seems to be working ok.  However I have now another issue with slightly different measure The data looks like this:

TASKS TABLE

TASK NAMEFINISH DATEBASELINE FINISH DATEACTUAL FINISH DATEVALUE
A12/01/202003/01/202012/01/2020£100
B13/01/202004/01/202013/01/2020£50
C14/01/202005/01/202014/01/2020£20
D15/01/202006/01/2020 £10
E16/01/202007/01/2020 £10

 

I want to have S curve with 3 lines:

Forecast Running total ( Sum of Value based on Finish dates over time) , 

Baseline RUnning total ( Sum of Value based on Baseline finish dates over time) , 

Actual RUnning total ( Sum of Value based on Actual finish dates over time) , 

Measures used are same for all 3 lines just have different Value fields.It seems to be working however Baseline and forecast lines are identical even though they should not be based on the values and I cannot workout why any thoughts? 

 

RUNNNINGTOTALFINANCEFORECAST =
CALCULATE(
    SUM(Tasks[ForecastValue]),   #Created a new conditional collumn from VALUE field logic used: IF Finish date not null, Tasks[VALUE], 0 
 
    FILTER(
        ALLSELECTED(Tasks),
        Tasks[TaskFinishDate] <= MAX(Tasks[TaskFinishDate])
    )
)
Stachu
Community Champion
Community Champion

your visual is using only one date of the 3 fields in the axis either the regular finish date or baseline, or actual

in order for this to work you need a separate calendar table with active join with the date field you will use the most, and inactive joins with the rest

you can then activate the inactive joins in the related formula using USERRELATIONSHIP

https://docs.microsoft.com/en-us/dax/userelationship-function-dax



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Anonymous
Not applicable

Thank you 🙂

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.