cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bekzod Frequent Visitor
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

Accepted Solutions
Highlighted
Community Support Team
Community Support Team

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

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 more quickly.

View solution in original post

1 REPLY 1
Highlighted
Community Support Team
Community Support Team

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

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 more quickly.

View solution in original post

Helpful resources

Announcements
New Kudos Received Badges Coming

New Kudos Received Badges Coming

Kudos to you if you earned one of these! Check your inbox for a notification.

Microsoft Implementation for Communities Wins Award

Microsoft Implementation for Communities Wins Award

Learn about the award-winning innovation that was implemented across Microsoft’s Business Applications Communities.

Power Platform World Tour

Power Platform World Tour

Find out where you can attend!

Top Kudoed Authors (Last 30 Days)
Users online (1,385)