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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
donalffons
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
lalthan
Resolver II
Resolver II

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

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

5 REPLIES 5
lalthan
Resolver II
Resolver II

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.

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?

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

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

Could you put an image of how the graph looked?

 

Tanks!

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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