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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Ammii11
New Member

Cumulative progress calculation using discrete updates to progress

Hi,

I am new to Power BI and do not have a particularly strong coding background.

I am trying to display a project's progress (in terms of hours) over time based on earned value (in hours) for submission of documents. The only issue is, when a document is submitted for the same purpose more than once, I do not want to double count the document. Please see below.

Document NameIssue PurposeProgress Earnt (%)Total for this document (hrs)Date
DocAIFR2010May 1st 2023
DocBIFR2010May 20th 2023
DocCIFR2010May 20th 2023
DocAIFC

90

10June 2nd 2023
DocBIFC9010June 4th 2023
DocCIFC9010June 5th 2023
DocAIFC9010June 19th 2023
DocBIFC9010June 19th 2023

 

My dataset is a history of all the submissions of each of the documents, with a new row for each submission.

 

Then the cummulative progress becomes as follows (note I've not included all the inbetween dates though my visual will be a date continuum).

 

Date20th April 2023May 1st 2023May 21st 2023June 2nd 2023June 4th 2023June 5th 2023June 19th 2023
Progress (hrs)02613202727

 

In this case although DocA and DocB were issued twice, it was for the same issue purpose so they do not earn any more progress hours. 

 

Any help would be greatly appreciated. So far, I have not be able to make any useful advances in getting this accomplished.

 

Thanks,
Amy

1 ACCEPTED SOLUTION

For anyone out there interested, I ended up getting the result I was looking for using the following:

 

measure = calculate(sumx(DISTINCT(table[document_number])),filter(allselected(table[document_received_date]),sheet[document_received_date]<=max(sheet[document_received_date])))

 

Where document number is constructed such that future revisions have the same numbering and thus are not distinct.

 

Note that for a given day the total will be shown but the cummulative sum avoids including the previous versions in the count.

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Ammii11 , You have try meausre like

 

Sumx(SUMMARIZE(Table, Table[Document Name], Table[Issue Purpose], Table[document (hrs)]), Table[document (hrs)])

 

 

 

Or create a column
UniqueDocument = CONCATENATE([Document Name], [Issue Purpose])

and a measure like

Cumm =
CALCULATE(
SUM('Table'[Progress Earnt (%)]);
FILTER(
ALL('Table');
'Table'[UniqueDocument] IN VALUES('Table'[UniqueDocument]) &&
'Table'[Date] <= MAX('Table'[Date])
)
)

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

For anyone out there interested, I ended up getting the result I was looking for using the following:

 

measure = calculate(sumx(DISTINCT(table[document_number])),filter(allselected(table[document_received_date]),sheet[document_received_date]<=max(sheet[document_received_date])))

 

Where document number is constructed such that future revisions have the same numbering and thus are not distinct.

 

Note that for a given day the total will be shown but the cummulative sum avoids including the previous versions in the count.

Hi @amitchandak - thanks for this. It does seem to go partly where I need to be. However, I am still having some issues. I have tried both methods. With the following output.

Ammii11_0-1687498263459.png

The actual for this date should be 20.56 as the progress on the other docs in yellow was already earnt.

 

I've used this for the table on the left

 

CummProgDocs = CALCULATE(
    SUM(SDX_Doc_History[Hours_Earn]),
    FILTER(
        ALL(SDX_Doc_History),
       SDX_Doc_History[UniqueDocument] IN VALUES(SDX_Doc_History[UniqueDocument]) &&
        SDX_Doc_History[Formally Received] <= MAX(SDX_Doc_History[Formally Received])
    )
)
 
and this for that on the right. Please can you advise if you see any errors in my interpretation?
 
Doc_Prog = sumx(SUMMARIZE(SDX_Doc_History,SDX_Doc_History[document title],SDX_Doc_History[Issue Purpose],SDX_Doc_History[Hours_Earn]),SDX_Doc_History[Hours_Earn])
 
Thanks again.

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.