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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
GIvanov
Frequent Visitor

Scatter chart and multiple data series

I am new to the Power BI and I want to create a scatter chart with two date series. Each one should have a different color.

The first one has the columns: X1, Y1

The second one: X2, Y2

My table contains four columns X1, Y1, X2 and Y2.

I fail with inserting the second data series to the scatter chart. The only idea I have got is to make two transparent diagrams overeach other.

 

Thank you,

 

 

1 ACCEPTED SOLUTION
v-tangjie-msft
Community Support
Community Support

Hi @GIvanov ,

 

According to your description, here are my steps you can follow as a solution.

(1) This is my test data. 

vtangjiemsft_0-1686279334061.png

(2)Click "transform data" to enter the power query editor, then select [y1] and [y2] columns, click to transpose other columns, then select [Attribute] and [Value] columns, click to transpose other columns, and then click close and apply.

vtangjiemsft_1-1686279691334.pngvtangjiemsft_2-1686279716579.pngvtangjiemsft_3-1686279742890.png

(3)We can create a calculated column.

Legend = SWITCH(TRUE(),
AND(CONTAINSSTRING('Table'[Attribute-x],1) ,CONTAINSSTRING('Table'[Attribute-y],1)),1,
AND(CONTAINSSTRING('Table'[Attribute-x],2) ,CONTAINSSTRING('Table'[Attribute-y],2)),2)

(4)Then we can create a table.

Table 2 = FILTER('Table','Table'[Legend]=1 || 'Table'[Legend]=2)

(5) Then the result is as follows.

vtangjiemsft_4-1686280010194.png

Best Regards,

Neeko Tang

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

View solution in original post

2 REPLIES 2
v-tangjie-msft
Community Support
Community Support

Hi @GIvanov ,

 

According to your description, here are my steps you can follow as a solution.

(1) This is my test data. 

vtangjiemsft_0-1686279334061.png

(2)Click "transform data" to enter the power query editor, then select [y1] and [y2] columns, click to transpose other columns, then select [Attribute] and [Value] columns, click to transpose other columns, and then click close and apply.

vtangjiemsft_1-1686279691334.pngvtangjiemsft_2-1686279716579.pngvtangjiemsft_3-1686279742890.png

(3)We can create a calculated column.

Legend = SWITCH(TRUE(),
AND(CONTAINSSTRING('Table'[Attribute-x],1) ,CONTAINSSTRING('Table'[Attribute-y],1)),1,
AND(CONTAINSSTRING('Table'[Attribute-x],2) ,CONTAINSSTRING('Table'[Attribute-y],2)),2)

(4)Then we can create a table.

Table 2 = FILTER('Table','Table'[Legend]=1 || 'Table'[Legend]=2)

(5) Then the result is as follows.

vtangjiemsft_4-1686280010194.png

Best Regards,

Neeko Tang

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

I needed few hours to understand how it works, but it really works. Thank you.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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