The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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
SAMPLE_NAME | 380 | 390 | 400 | 410 | 420 | 430 | 440 | 450 | 460 | 470 | 480 | 490 | 500 |
A1 | 0.06715523 | 0.07514843 | 0.08561376 | 0.09367788 | 0.10076409 | 0.10113856 | 0.10029749 | 0.0978543 | 0.09558688 | 0.09416641 | 0.0953188 | 0.10566926 | 0.12481427 |
B1 | 0.06674039 | 0.07526408 | 0.088112 | 0.0970641 | 0.10364106 | 0.10344948 | 0.10247326 | 0.10003751 | 0.09748459 | 0.09579706 | 0.09643588 | 0.10633558 | 0.12543806 |
C1 | 0.0671481 | 0.07585869 | 0.08807653 | 0.09684968 | 0.10376704 | 0.10385086 | 0.10314085 | 0.10070652 | 0.09807772 | 0.09619305 | 0.09670834 | 0.10656605 | 0.12584065 |
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 name | radiation | value |
A1 | 380 | 0.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
Hi @yummy ,
If your data model looks like this:
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
Best Regards,
Dino Tao