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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
bgierwi2
Frequent Visitor

Display Cumulative Percentage Over Time - Line Chart

I have a list of SAP Notifications.

Each Notification eventually gets a Work Order assigned to it as the job is planned.

And I have a date column for when the Work Order is created

Eventually every Notification will have a Work Order.

 

I want to show a Line Chart that tracks WO creation over time.  With time as the X-Axis and Percent Complete (Count of Work Orders/Count of Notifications) as the Y-Axis

So I can track the cumulative progress of WO creation from 0% to 100% over time

 

I haven't been able to incorporate time into any of the measures that I have tried

Any help would be appreciated

 

bgierwi2_0-1662732434146.png   

bgierwi2_2-1662732515377.png

 

 

1 ACCEPTED SOLUTION

@bgierwi2 OK, well, this is going to depend a bit on what date you use for your x-axis and whether you want to count all Notifications every time or just those that were created prior to the specific date on the axis. Making some simplifying assumptions and using the only date in your sample data it should look something like this:

Measure =
  VAR __Date = MAX('Table'[Date Work Order Created])
  VAR __AllCount = COUNTROWS(ALL('Table'))
  VAR __CurrentCount = COUNTROWS(FILTER(ALL('Table'),[Date Work Order Created] <> BLANK() && [Date Work Order Created] <= __Date))
RETURN
  DIVIDE(__CurrentCount, __AllCount, 0)

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

4 REPLIES 4
Greg_Deckler
Super User
Super User

@bgierwi2 Maybe this? 
Take a look at these two Quick Measures as I think you want something like them.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Open-Tickets/m-p/409364
https://community.powerbi.com/t5/Quick-Measures-Gallery/Periodic-Billing/m-p/409365

 

If not, Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler - Thank your for the response:

 

Here is some sample data

All of the notifications are already generated, and planners are creating WOs as they plan the work.

As a Work Order is created, another column shows the date the Work Order is created

This is in progress, eventually every notifiication will have a Work Order, and the progress will be 100%

 

NotificationWork OrderDate Work Order Created
17460816906961049/9/2022
17452563  
17452566930727629/1/2022
17452680  
17452682951132388/15/2022
17452566  
17451599951155728/14/2022
17451601  
17451602  
17451604993513748/1/2022

 

I would like to have a line chart:

X-Axis showing Date

Y-Axis Showing Count (Work Orders) / Count (Notifications)

That will track the progress of generating Work Orders from 0% to 100%

With this sample data, the progress should start at 0% and end at 50% (5 Work Orders generated out of 10 Notifications), between 8/1/2022 and 9/9/2022

 

I would like it to look something like what is below

 

bgierwi2_0-1662738835300.jpeg

 

 

@bgierwi2 OK, well, this is going to depend a bit on what date you use for your x-axis and whether you want to count all Notifications every time or just those that were created prior to the specific date on the axis. Making some simplifying assumptions and using the only date in your sample data it should look something like this:

Measure =
  VAR __Date = MAX('Table'[Date Work Order Created])
  VAR __AllCount = COUNTROWS(ALL('Table'))
  VAR __CurrentCount = COUNTROWS(FILTER(ALL('Table'),[Date Work Order Created] <> BLANK() && [Date Work Order Created] <= __Date))
RETURN
  DIVIDE(__CurrentCount, __AllCount, 0)

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler 

 

It worked!

Thank you so much!

 

I never would have come up with that on my own, this is exactly what I was looking for

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors