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

Cumulative line of number of items on day

I need to create a graph that shows cumulative completed vs target tasks

 

my data looks like this (including tasks that dont have target dates)

 

Item	complete target	complete date
task 1	20-Jul	        18-Jul
task 2	20-Jul	        21-Jul
task 3	25-Jul	        25-Jul
task 4	30-Jul	        31-Jul
task 5		
task 6		

Capture.PNG

 

what i'm trying to get is a graph that looks like this, where the Y axis is the number of tasks on the particular day, i have looked at some examples of cumulative lines but most of them assume there is a number in the item column that they can sum up vs a string value, and i just can't wrap my head around what to change.

Also key is that task with no date value should not be calculated in the graph.

 

1 ACCEPTED SOLUTION
v-danhe-msft
Employee
Employee

Hi @briodan

 

Based on my test, you can refer to below steps:

1.I have entered some sample data to test for your problem like the picture below:

A.PNG

2.Create a new table, two calculated columns, two measures.

Table = CALENDAR("18/6/2018","8/1/2018")

Calculated columns:

Plan Count = CALCULATE(COUNT(Table1[Item]),FILTER('Table1','Table1'[complete target]='Table'[Date]))

Actual Count = CALCULATE(COUNT(Table1[Item]),FILTER('Table1','Table1'[complete date]='Table'[Date]))

Measures: Plan Measure = CALCULATE(SUM('Table'[Plan Count]),FILTER(ALL('Table'),'Table'[Date]<=MAX('Table'[Date])))

Actual Measure = CALCULATE(SUM('Table'[Actual Count]),FILTER(ALL('Table'),'Table'[Date]<=MAX('Table'[Date])))

3.Create a Line visual and add the related fields, you can see the result.

B.PNG

You can also download the PBIX file to have a view.

https://www.dropbox.com/s/502lvy080guxk6y/Cumulative%20line%20of%20number%20of%20items%20on%20day.pb...

 

Regards,

Daniel He

 

Community Support Team _ Daniel He
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-danhe-msft
Employee
Employee

Hi @briodan

 

Based on my test, you can refer to below steps:

1.I have entered some sample data to test for your problem like the picture below:

A.PNG

2.Create a new table, two calculated columns, two measures.

Table = CALENDAR("18/6/2018","8/1/2018")

Calculated columns:

Plan Count = CALCULATE(COUNT(Table1[Item]),FILTER('Table1','Table1'[complete target]='Table'[Date]))

Actual Count = CALCULATE(COUNT(Table1[Item]),FILTER('Table1','Table1'[complete date]='Table'[Date]))

Measures: Plan Measure = CALCULATE(SUM('Table'[Plan Count]),FILTER(ALL('Table'),'Table'[Date]<=MAX('Table'[Date])))

Actual Measure = CALCULATE(SUM('Table'[Actual Count]),FILTER(ALL('Table'),'Table'[Date]<=MAX('Table'[Date])))

3.Create a Line visual and add the related fields, you can see the result.

B.PNG

You can also download the PBIX file to have a view.

https://www.dropbox.com/s/502lvy080guxk6y/Cumulative%20line%20of%20number%20of%20items%20on%20day.pb...

 

Regards,

Daniel He

 

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.