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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Doliveira
Frequent Visitor

Line Chart by date

Hi everyone,

 

I'm trying to create a line chart with two lines, using the columns "Reported Date" and "Closed Date". Those columns have the date format "dd/mm/yyyy". The result of this chart should be the count of "Reported Date" and "Closed Date" for the last 15 days.

 

The problem is that when I put the Axys field as "Reported Date" (the only way I've found to put Date on X-Axys), and the Values field with "Count of Reported Date" and "Count of Closed Date", the line of "Closed Date" do not shows the correct value because the value it's not the same on "Reported Date". 

 

On the example below, the chart shows at day 03/08/2017 the line "Reported Date" with the count of 9, and the line "Reported Date" with the count of 3.

 

Example for the date "03/08/2017":

 

Sorting by Closed Date (11 rows):

 

Reported DateClosed Date
20/07/2017 10:5203/08/2017 17:58
28/06/2017 17:4803/08/2017 16:49
27/06/2017 10:1803/08/2017 16:44
03/08/2017 15:2903/08/2017 16:32
03/08/2017 08:4703/08/2017 12:57
03/08/2017 08:4103/08/2017 12:55
04/07/2017 15:4003/08/2017 11:28
25/07/2017 13:3903/08/2017 11:27
26/05/2017 12:3403/08/2017 11:26
31/01/2017 16:0003/08/2017 11:08
02/08/2017 09:2903/08/2017 09:04

 

Sorting by Reported Date (9 rows):

 

Reported DateClosed Date
03/08/2017 19:11 
03/08/2017 15:2903/08/2017 16:32
03/08/2017 13:45 
03/08/2017 13:23 
03/08/2017 10:16 
03/08/2017 10:07 
03/08/2017 09:11 
03/08/2017 08:4703/08/2017 12:57
03/08/2017 08:4103/08/2017 12:55

 

My english it's a little rusty, sorry for that.

 

Thanks

1 ACCEPTED SOLUTION
vanessafvg
Super User
Super User

@Doliveira

 

what you need to is create a date table

 

then you need to create 2 relationships to your date table

one from reported date to date

another from closed date to date

you will see the second one becomes a --- line that will be the inactive relationship

 

then you need to place your date from you date table on the visual

 

your first measure will be 

reported count = calculate(countrows(tablename))

closed count = calculate(countrows(tablename), userelationship(table[closeddate], datetable[date])

 

then you can plot both

 

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
vanessafvg
Super User
Super User

@Doliveira

 

what you need to is create a date table

 

then you need to create 2 relationships to your date table

one from reported date to date

another from closed date to date

you will see the second one becomes a --- line that will be the inactive relationship

 

then you need to place your date from you date table on the visual

 

your first measure will be 

reported count = calculate(countrows(tablename))

closed count = calculate(countrows(tablename), userelationship(table[closeddate], datetable[date])

 

then you can plot both

 

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Just amazing! Thank you very much! Work as requested!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.