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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Line graph, add second line with last week's data?

I have a line graph that displays speed for the past 7 days. How do I add a second line that shows speed for the same days of the previous week?

 

1 ACCEPTED SOLUTION
v-huizhn-msft
Employee
Employee

Hi @Anonymous,

My sample table:

1.PNG

Please create measure using the formula below. Create a table visual to display the result, check if it's correct.

speed for the same days of previous week = CALCULATE(SUM(Table1[speed]),DATEADD(Table1[Date],-7,DAY))


2.PNG

Beside your "speed for the past 7 days" measure, then add it as value level in line Chart, we can add mutiple measure as value levels in line chart.
3.png

Best Regards,
Angelia


View solution in original post

1 REPLY 1
v-huizhn-msft
Employee
Employee

Hi @Anonymous,

My sample table:

1.PNG

Please create measure using the formula below. Create a table visual to display the result, check if it's correct.

speed for the same days of previous week = CALCULATE(SUM(Table1[speed]),DATEADD(Table1[Date],-7,DAY))


2.PNG

Beside your "speed for the past 7 days" measure, then add it as value level in line Chart, we can add mutiple measure as value levels in line chart.
3.png

Best Regards,
Angelia


Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.