cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
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
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
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Ask Amanda Anything Q&A

Ask Amanda Anything Q&A

Learn the answers to some of the questions asked during the Amanda Triple A event.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Users Online
Currently online: 159 members 1,507 guests
Please welcome our newest community members: