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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
toball
Regular Visitor

Running Total - Two dates - Received and Completed

Hi all,

 

Looking to replicate the second list in my attachment in Power BI running total or waterfall chart, I just cannot get my head around how to do this but know it must be simple! 

 

Company receives jobs with a set value each day. Columns in same list give received date and completion date (which is blank until completion date is entered)

 

Exampple.PNG

Thanks in advance!

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

If we exclude those null entries directly in the Work Completed Sum, does that help?

Work Completed Sum = CALCULATE(
    [Work Received Sum],
    USERELATIONSHIP(JobList[Date Completed], Dates[Date]),
    NOT(ISBLANK(JobList[Date Completed]))
)

(I don't have my quick sample project, so i haven't tested out this code)

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

You do this with adding in a Date Table, which there are many guides around for.
Link your 'Job List' to the date table by both "Received Date" and "Completed Date" (one will need to be set to inactive).

Capture.PNG

Next we'll write 3 measures, one called "Work Received", "Work Completed", and "Incomplete Work".   Which ever date you set as being Active in your relationship, use that one first.  I'll assume its "Work Received".

Work Received Sum = VAR endDate = LASTDATE(Dates[Date])
VAR output = CALCULATE(
    SUM(JobList[Work Received]),
    ALL(Dates),
    Dates[Date] <= endDate
)
RETURN
output
Work Completed Sum = CALCULATE(
    [Work Received Sum],
    USERELATIONSHIP(JobList[Date Completed], Dates[Date])
)
Incomplete Work = [Work Received Sum] - [Work Completed Sum]


Now use the date table on your visuals along with the 3 measures and you can get:

Capture2.PNG

 

Hi Ross, 

 

Thanks so much, I have put this into my PowerBI sheet and I can see it is working. One problem - any items in the my list which do not yet have a completion date ('null' in my query table) are all summing as the first row with a blank heading. The result of this is that the Work Completed Sum starts out at a negative number equal to the amount of work not yet completed then gradually builds to zero. 

 

If I apply a filter, it removes the Value of the Work Received as well as the Work Completed. 

 

Sorry if this is a really quick fix that I am missing - I am new to PowerBI and am having fun learning but I am stuck again here. 

 

Cheers, Tobi

 

 

Anonymous
Not applicable

If we exclude those null entries directly in the Work Completed Sum, does that help?

Work Completed Sum = CALCULATE(
    [Work Received Sum],
    USERELATIONSHIP(JobList[Date Completed], Dates[Date]),
    NOT(ISBLANK(JobList[Date Completed]))
)

(I don't have my quick sample project, so i haven't tested out this code)

Awesome - works great now! Thanks so much Ross - appreciate the quick responses.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

August Carousel

Fabric Community Update - August 2024

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