cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
donalffons Frequent Visitor
Frequent Visitor

Dynimc Multi Line Plots of Large Data Sets

Hi,

 

I am quite new to PowerBI and I am struggling with the following problem:

 

I have a table (Table 1) containing company names and general information. The companies (there are thousands of them) could change over time. It looks like this:

NameSectorInfo
AppleConsumer ProductsPhones
GoogleSoftwareSearch
Pizza HutFoodPizzas
… (thousands of comps)

 

I have another table (Table 2) that contains a time-series table about the market capitalization of each company:

DateAppleGooglePizza Hut… (tousands of comps)
01.01.20011007010
02.01.20011108020
03.01.20011209030
04.01.200113010040

 

 

What I would like to achieve is the following: I would like to plot the market cap from Table 2 in a line plot over time. Then I would like to have a slicer next to the plot, where I can select the companies. Something like in this mockup:

 

Is this possible in PowerBI? Can I do it with some dynamic measures? Do I need to create custom visuals?

 

Best regards

-Sebastian

2 ACCEPTED SOLUTIONS

Accepted Solutions
lalthan Regular Visitor
Regular Visitor

Re: Dynimc Multi Line Plots of Large Data Sets

Best solution is to unpivot your columns from table 2.  Go to query Editor for Table 2 > Transform.

Click on Date column and select "Unpivot other columns" i.e. it will unpivot all the other columns except Date (which is the selected column).

Rename the Attribute column and then join it with Table1.

View solution in original post

lalthan Regular Visitor
Regular Visitor

Re: Dynimc Multi Line Plots of Large Data Sets

On your line chart, add the attribute as a Legend. Then configure your slicer to allow multiple selection. They will come as separate chart

View solution in original post

4 REPLIES 4
lalthan Regular Visitor
Regular Visitor

Re: Dynimc Multi Line Plots of Large Data Sets

Best solution is to unpivot your columns from table 2.  Go to query Editor for Table 2 > Transform.

Click on Date column and select "Unpivot other columns" i.e. it will unpivot all the other columns except Date (which is the selected column).

Rename the Attribute column and then join it with Table1.

View solution in original post

donalffons Frequent Visitor
Frequent Visitor

Re: Dynimc Multi Line Plots of Large Data Sets

OK, that's almost what I want. Thanks!

 

My table (Table 2) now looks like this (So far, I did not join Table 1 and Table 2):

DateCompaniesMarket Cap
01.01.2001Apple100
01.01.2001Google70
01.01.2001Pizza Hut10
02.01.2001Apple110
02.01.2001Google80
02.01.2001Pizza Hut20

 

When I plot my line plot, I get a good result only when I chose one company in the slicer. As soon as I chose 2 companies, PowerBI seems to show the sum of both companies (see 'Actual Result'):

 

What would be your recommendation to achieve the 'desired result', i.e. showing separate plots with different colors for all selected companies?

lalthan Regular Visitor
Regular Visitor

Re: Dynimc Multi Line Plots of Large Data Sets

On your line chart, add the attribute as a Legend. Then configure your slicer to allow multiple selection. They will come as separate chart

View solution in original post

donalffons Frequent Visitor
Frequent Visitor

Re: Dynimc Multi Line Plots of Large Data Sets

Thank you! That is exactly what I was looking for.

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors