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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Aragorn
Helper I
Helper I

Line chart - Add lines based on table selection

Hi,

 I have a table of objects in the main report. These objects have a seperate table with historic data.

ex:
 Table 1:

OBJECT_IDOBJECT_NAME
T001Test Point 01
T002Test Point 02
T003Test Point 03

 
 And the History data table:
 

OBJECT_IDRECORD_DATEVALUE
T00110/10/20225
T00111/10/20227
T00211/10/20223
T00112/10/20228
T00312/10/20221
T00312/10/20222

and it goes on..

 

I also have a LINE CHART to show this history data.


IS it possible to generate the line chart based on the selection of objects from table1 ?
i.e
If you select T001 from the table, the chart would show values for T001. 
If you select T002 from the table, the chart would show values for T002.

But If you select T001 AND T002, there should be 2 Lines in the chart, 1 for each object.

 

We only have max 5 Objects, so If there's a way to give 5 measures as Y Values for the chart which somehow get values for each object..?

Is this something doable?


Please help! 
Thank you!

 


2 REPLIES 2
v-yanjiang-msft
Community Support
Community Support

Hi @Aragorn ,

According to your description, here's my solution.

The two tables are related with OBJECT_ID column.

vkalyjmsft_0-1669788971671.png

Put RECORD_DATE in X-axis, VALUE in Y-axis and OBJECT_ID in Legend.

vkalyjmsft_1-1669789093605.png

Result:

vkalyjmsft_2-1669789240607.png

vkalyjmsft_3-1669789256028.png

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi, 
 Yes.. this works.
But Is there a way to show the "Average" of all when No object is selected, instead of showing all the lines?

In the data I have, there are 1000s of Objects. I want to show the average of  all when more than 5 objects are selected. If its less than 5, then the 5 lines should appear.

Sorry I forgot to mention that earlier.

 

Thank you so much!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.