cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
tnolte Frequent Visitor
Frequent Visitor

Ordering Yields on a line graph

Somewhat new at PowerBI, but am stuck on creating an order for the following data.  This question has been answer a number of times, but I can't seem to make the solution work though I'm sure it is my lack of experience in PowerBI.

 

The data is a series of yields for specific maturities of specific generic bond curves. For each curve sector name, there will be 15 or 16 different yields.

 

For instance, I wish to display in ascending order the yields for 3m, 6m, 1y, 2y...up to 30y for the Curve Named "USD US Corporate BBB+, BBB, BB".  However, the I cannot seem to order by tenor so the X axis is ascending.   I've done some research here and ran across the solution where I need to create another table with sequential number for each row but, to be honest, I'm a bit lost when reading the solution.

 

Notice how the order goes from 15Y to 30Y then back to 25y then 20y?  All the other tenors are ordered ascending except these 4.

 

PowerBI Curves 2.jpg

 

You'll see that the column "tenors" has non-unique values.  This is because for each curve I wish to plot, they each have similar maturities (i.e., 3 month, 6 month, 10 year, etc...)

 

PowerBI Curves.jpg

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Ordering Yields on a line graph

Hi tnolte,

 

According to your description, I create sample data to reproduce the scenario. You have the Index Ref column already in your desired sort order from the screenshot, now select the column Tenor and Curve and click Modeling -> Sort by Column as showing picture below.

 

1.jpg

 

 

 

 

 

 

Then, create Line Chart visual and the Tenor and Curve on the axis will be sorted according to the value of the Index Ref column.

 

2.jpg 

 

 

 

 

Here is my test pbix file link: https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/ERLX2CJ6RxdEoew9fk...

 

Best Regards,

Amy

 

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

2 REPLIES 2
Community Support Team
Community Support Team

Re: Ordering Yields on a line graph

Hi tnolte,

 

According to your description, I create sample data to reproduce the scenario. You have the Index Ref column already in your desired sort order from the screenshot, now select the column Tenor and Curve and click Modeling -> Sort by Column as showing picture below.

 

1.jpg

 

 

 

 

 

 

Then, create Line Chart visual and the Tenor and Curve on the axis will be sorted according to the value of the Index Ref column.

 

2.jpg 

 

 

 

 

Here is my test pbix file link: https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/ERLX2CJ6RxdEoew9fk...

 

Best Regards,

Amy

 

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

tnolte Frequent Visitor
Frequent Visitor

Re: Ordering Yields on a line graph

This works perfectly.  Thank you.  It appears ordering by the column BEFORE creating the graph is the way to do it.  I had no idea.

Helpful resources

Announcements
Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Virtual Launch Event

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 362 members 3,336 guests
Please welcome our newest community members: