Forum Discussion
Multiple Line chart - two date columns
Hello,
I have table with tasks, that contains columns: TASK, Created Date of task, Start Date and Completition Date.
I need to create the line chart with number of tasks Completed vs total number of tasks created in period of time(x:month, Y1: TASK, Y2:SumCompletedTasks(DAX)). In other words How many tasks were created vs how many was completed, month by month.
I can not use on X axis (month) columns Created Date of task or Completition Date because it will show me only data one of them, not separate.
The problem is when I create separate DATE table I need to link it to the main table. When I link it to Start date or completition date it does not have a sense.
Example Data:
| Task | Created | Start Date | Completion date |
| Task 1 | 07/30/2023 | 07/31/2023 | 08/15/2023 |
| Task 2 | 07/30/2023 | ||
Task 3 | 08/05/2023 | 08/05/2023 | 08/30/2023 |
Task 4 | 08/05/2023 |
Based on the above data: Completed (0) vs Created (2) in July.
Could anyone help me to solve that issue?
2 Replies
- AnonymousNot applicable
Hi Dash7 ,
Here are the steps you can follow:
1. In power query – select [Created], [Start Date] ,[Completion date] – Transform – Unpivot Column.
2. Create measure.
create = COUNTX( FILTER(ALL('Table'), YEAR('Table'[Value])=YEAR(MAX('Table'[Value]))&&MONTH('Table'[Value])=MONTH(MAX('Table'[Value]))&&'Table'[Attribute]="Created"),[Task])complete = COUNTX( FILTER(ALL('Table'), YEAR('Table'[Value])=YEAR(MAX('Table'[Value]))&&MONTH('Table'[Value])=MONTH(MAX('Table'[Value]))&&'Table'[Attribute]="Completion date"),[Task])3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- Dash7Frequent Visitor
Thank you, but is there any other chance to do that without duplicating the rows? My data source is sharepoint list, and i am not sure if it will not impact the charts i already built