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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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.

Anonymous
Not applicable

Could you put an image of how the graph looked?

 

Tanks!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors