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
jwesle
Frequent Visitor

Calculating Completion Percent Based on Multiple Date Fields

Hello,

 

I will do my best to explain what I am trying to calculate. My data set will look something like the following:

 

Line Enter DateLine Data DateLine Complete Date
4/5/20194/5/20194/9/2019
4/7/20194/8/20194/12/2019
4/8/2019 4/10/2019
4/8/20194/9/2019 
4/10/20194/10/2019 
4/10/20194/10/2019 
4/12/20194/14/20194/14/2019
4/14/2019  
4/14/20194/14/2019 

 

I am trying to calculate the percentage of Open Lines that contain data (where Open Line is defined as an entered line with no Complete Date).

 

The table below represents the logic for this sample data and the desired result in the far right column:

 

Calendar DateNew Lines EnteredNew Data EnteredLines CompletedLines with Data CompletedTotal Open LinesTotal Open Lines with DataData Percentage
4/5/2019110011100%
4/6/2019000011100%
4/7/201910002150%
4/8/201921004250%
4/9/201901113267%
4/10/2019221044100%
4/11/2019000044100%
4/12/201910114375%
4/13/201900004375%
4/14/201922115480%

 

On 4/5, 1 line was entered with data, so the completion is (1/1) = 100%. 

No new data on 4/6 and no lines completed, so it remains (1/1) = 100%

One new line on 4/7 (but data not entered until 4/8), and no lines completed, so it reduces to (1/2) = 50%

On 4/8, two new lines entered with no data, but data entered on a previous open line, so it is (2/4) = 50%

On 4/9, no lines entered, data entered for one open line, and one line with data completes, so it is (2/3) = 67%

etc.

 

I am really struggling with the logic to build this concept in PowerBI. Any help/advice is greatly appreciated.

 

Thanks!

1 ACCEPTED SOLUTION
v-xicai
Community Support
Community Support

Hi @jwesle 

 

You can create columns to meet your demand.

 

Total Open Lines = CALCULATE(SUM(Table1[New Lines Entered]),FILTER(Table1,Table1[Calendar Date]<=EARLIER(Table1[Calendar Date])))-CALCULATE(SUM(Table1[Lines Completed]),FILTER(Table1,Table1[Calendar Date]<=EARLIER(Table1[Calendar Date])))

 

Total Open Lines with Data = CALCULATE(SUM(Table1[New Data Entered]),FILTER(Table1,Table1[Calendar Date]<=EARLIER(Table1[Calendar Date])))-CALCULATE(SUM(Table1[Lines with Data Completed]),FILTER(Table1,Table1[Calendar Date]<=EARLIER(Table1[Calendar Date])))

 

Data Percentage = DIVIDE(Table1[Total Open Lines with Data],Table1[Total Open Lines])

 

 

2.jpg 

 

 

 

Here is my test pbix: https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/EUjge7rleNZCme1Qkq...

 

Best Regards,

Amy

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-xicai
Community Support
Community Support

Hi @jwesle 

 

You can create columns to meet your demand.

 

Total Open Lines = CALCULATE(SUM(Table1[New Lines Entered]),FILTER(Table1,Table1[Calendar Date]<=EARLIER(Table1[Calendar Date])))-CALCULATE(SUM(Table1[Lines Completed]),FILTER(Table1,Table1[Calendar Date]<=EARLIER(Table1[Calendar Date])))

 

Total Open Lines with Data = CALCULATE(SUM(Table1[New Data Entered]),FILTER(Table1,Table1[Calendar Date]<=EARLIER(Table1[Calendar Date])))-CALCULATE(SUM(Table1[Lines with Data Completed]),FILTER(Table1,Table1[Calendar Date]<=EARLIER(Table1[Calendar Date])))

 

Data Percentage = DIVIDE(Table1[Total Open Lines with Data],Table1[Total Open Lines])

 

 

2.jpg 

 

 

 

Here is my test pbix: https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/EUjge7rleNZCme1Qkq...

 

Best Regards,

Amy

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.