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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
NNaj
Helper IV
Helper IV

Scatterplot line graph plotting issues

Hi All,

I am trying to plot the rank of a company over the past 4 quarters. 

Y-axis: Ranking

X-axis: Quarters

Legend: Comapny (One line for each company)

 

My data is shown below.

 

Data to plot.png

 

I tried using scatter charts and line charts but CP ID goes to the x-axis (see bwlow) and I cant move the values around in the fields page. Any ideas on how to solve this? Thqanks in advance for all the help!

 

 

scatter graph.png

 

 

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

Hi @NNaj ,

It is hard to calculate across multiple columns, I'd like to suggest you to 'unpivot columns' on your quarter fields(at query editor side), then you can write a formula to rolling calculate over these quarter ranges. (id to axis, attribute as legend, measure as value)

Unpivot columns (Power Query) 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

6 REPLIES 6
v-shex-msft
Community Support
Community Support

Hi @NNaj ,

It is hard to calculate across multiple columns, I'd like to suggest you to 'unpivot columns' on your quarter fields(at query editor side), then you can write a formula to rolling calculate over these quarter ranges. (id to axis, attribute as legend, measure as value)

Unpivot columns (Power Query) 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hi @v-shex-msft ,

 

Thank you for your response. Just a quick follow up question, is it possible to unpivot tables while they are in a visual? My table is a visual on a page and I used measures to calculate the rankings.

 

Regards,

Nader

HI @NNaj ,

You can use the matrix visual to expand unpivoted fields.(id to rows, attribute to columns, measure as value)

BTW, you can also use duplicate query feature to create a backup table to do calculation with the original table structure.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
NNaj
Helper IV
Helper IV

Any ideas on this?@Washivale @amitchandak 

Hi @NNaj ,

 

not sure what you are looking for on this, however to better compare numbers by Quarters use Line chart and change formatting as per attached screenshot.

 

let me know if it helps.

Regards,

Washivale

image.png

Hi Washivale, 

Thanks for your reply.

 

I sketched the graph I am trying to make below.

 

The graph in my original post is the outcome of using the line graph, and I am unable to make CP_ID the legend and plot how the rank of each ID changes over the 4 periods.

 

 I hope this explains what I am trying to achieve.

rank graph.png

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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