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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
yummy
Regular Visitor

Linechart - Plot data as lines over categories

Dear Comunity, i'm new at using power bi and i would appreciate if someone could please help me configuring a line chart or scatter plot visual in power bi. I have a table with color measurement data. Each row includes the name of the measured sample, followed by the measured reflectance power at a list of wavelength of the radiation (380 - 730nm, 10nm Steps). I would like to create a line/curve plot showing the spectral reflectance of each sample over the wavelengths.  In Excel this is quite simple using a point plot. I tried a while by myself but did not manage to create such a simple plot in power bi. Could someone please explain me what i need to do to create such a plot in a power bi.

 

Thanks in advance - Christoph

yummy_0-1729514775322.png

 

SAMPLE_NAME380390400410420430440450460470480490500
A10.067155230.075148430.085613760.093677880.100764090.101138560.100297490.09785430.095586880.094166410.09531880.105669260.12481427
B10.066740390.075264080.0881120.09706410.103641060.103449480.102473260.100037510.097484590.095797060.096435880.106335580.12543806
C10.06714810.075858690.088076530.096849680.103767040.103850860.103140850.100706520.098077720.096193050.096708340.106566050.12584065

 

 

4 REPLIES 4
sanalytics
Super User
Super User

@yummy 
Below is the complete solution

sanalytics_0-1729518442148.png

Power BI file link
https://we.tl/t-w1b5TGKIPD

 

Regards

sanalytics

 

Selva-Salimi
Super User
Super User

Hi @yummy 

 

after uploading data in power bi you need to go transform data>> transform >> unpivot, use this option to change the structure of your data. it should sth like this:

Sample nameradiationvalue
A13800.06715523
...  

 

then you just need to use line chart. add radion to X-axis. sample_name to legend and value to y_axis

 

If this post helps, then I would appreciate a thumbs up  and mark it as the solution to help the other members find it more quickly. 

 

Hi @Selva-Salimi , thank you very mutch for your response...and yes changing data structure as described by you will work.
The "issue" is...there are more than 5000 measured samples in each file. Unpivoting will increase the amount of records for one file from 5000 to 170000. Thus i would really prefer to keep the structure as is.

Do you see an other solution not making it necessary to change the structure of the data? E.g. in excel one can simply switch rows/columns directly in the configuration of the line chart to make it work.
Isn't there something similar in PowerBI?

Thank you - Rgds Christoph

Anonymous
Not applicable

Hi @yummy ,

If your data model looks like this:

vjunyantmsft_0-1729562760787.png

 

I'm sorry, you may have to unpivot it first. Because Power BI processes data in columns, you cannot directly put the content of a row into a visual object, nor can you directly transform the data of a row.
That is to say, the three parts I circled in red in the figure below must appear in your data as columns, otherwise you cannot create this visual object

vjunyantmsft_1-1729563125298.png


Best Regards,
Dino Tao

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors