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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Dash7
Frequent Visitor

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:

TaskCreatedStart DateCompletion 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 2
Anonymous
Not applicable

Hi  @Dash7 ,

 

Here are the steps you can follow:

1. In power query – select [Created], [Start Date] ,[Completion date] – Transform – Unpivot Column.

vyangliumsft_1-1704784569245.png

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:

vyangliumsft_2-1704784595852.png

 

 

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

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 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.