The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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 |
Solved! Go to Solution.
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.
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.
@Irwan Hi Irwan,
Thank you so much for trying to help me. Unfortunately, I cannot use this approach as I have more than 25 columns in my table and I can't unpivot my table by using the attribute and value in the table. Please help me with an alternate approach.
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.
User | Count |
---|---|
65 | |
60 | |
55 | |
54 | |
31 |
User | Count |
---|---|
180 | |
88 | |
70 | |
46 | |
45 |