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
bekzod
Frequent Visitor

How to replicate comparative, relative line chart as in Google Analytics?

hi all,

I have a challenge visualizing comparative, relative time period in a line chart.

The line chart I am trying to replicate is already available in Google Analytics (see below). If I choose last 7 days, it shows two lines.

  • 1 for last 7 days
  • 2nd for 7 days before the last 7 days

 

Analytics 10-2-2019 7-30-34 PM.png

How to achieve this in Power BI? 

That would be a huge assitance if anyone could help me.

1 ACCEPTED SOLUTION
v-eachen-msft
Community Support
Community Support

Hi @bekzod ,

 

You couldn't do it directly in Power BI.

You could create two new columns.

7 days =
 DATEADD('Table'[Date],-7,DAY)
value2 =
LOOKUPVALUE ( 'Table'[value], 'Table'[Date], 'Table'[7 days] )

Then use line chart to get visual. Set rules in the filter pane. 

5-1.PNG

You could download my test file and refer to it.

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

1 REPLY 1
v-eachen-msft
Community Support
Community Support

Hi @bekzod ,

 

You couldn't do it directly in Power BI.

You could create two new columns.

7 days =
 DATEADD('Table'[Date],-7,DAY)
value2 =
LOOKUPVALUE ( 'Table'[value], 'Table'[Date], 'Table'[7 days] )

Then use line chart to get visual. Set rules in the filter pane. 

5-1.PNG

You could download my test file and refer to it.

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

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.