Forum Discussion
Line Graph for projects
Hello All,
My team has requested a line chart comparing "Project Completed per Month" vs "Projects Created per Month." I have data for approximately 250 projects and have attached a sample with 10 projects for reference. Could you please provide the formula to create a line graph where the X-axis represents months, and the Y-axis has two lines: one for the count of "Projects Completed per month" and the other for the count of "Projects Created per month"?
I request to attach the Power BI file if possible that you worked on using my data as a reference. Thank you in advance.
| Project Name | Created Date | Completed Date |
| A | 10/18/2024 | 12/2/2024 |
| B | 10/3/2024 | 10/30/2024 |
| C | 10/3/2024 | 11/25/2024 |
| D | 8/20/2024 | 12/31/2024 |
| E | 1/3/2025 | |
| F | 11/4/2024 | 1/17/2025 |
| G | 9/13/2024 | 12/23/2024 |
| H | 1/15/2025 | |
| I | 10/25/2024 | 1/11/2025 |
| J | 1/22/2025 | |
| J | 10/12/2024 |
hello h11
i might be misunderstood but do you have 25 more columns of date similar to 'Completed Date' and 'Created Date'?
also how do you get your data? if it is imported, you should have access to Power Query of your data? unless you get the data by Direct Query.
otherwise, please check this pbix if this suite to your requirement.
this is made without unpivot however the date table connected to 'Created Date' since looks like it will have value unlike 'Completed Date' which has blank value.
Thank you.
3 Replies
- IrwanSuper User
hello h11
please check if this accomodate your need.
1. unpivot your table
2. create two measures for completed and created
Completed =
CALCULATE(
COUNT('Table'[Attribute]),
'Table'[Attribute]="Completed Date"
)Created =
CALCULATE(
COUNT('Table'[Attribute]),
'Table'[Attribute]="Created Date"
)Hope this will help.
Thank you.
- IrwanSuper User
hello h11
i might be misunderstood but do you have 25 more columns of date similar to 'Completed Date' and 'Created Date'?
also how do you get your data? if it is imported, you should have access to Power Query of your data? unless you get the data by Direct Query.
otherwise, please check this pbix if this suite to your requirement.
this is made without unpivot however the date table connected to 'Created Date' since looks like it will have value unlike 'Completed Date' which has blank value.
Thank you.