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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Marco57
Helper III
Helper III

Line chart X,Y sorted

Hello,

 

I am astonished by the lack of capability for a vizualisation and table tool like power bi.

 

I want to create that chart as in Excel but with power bi chart line Y vs X.

I am expecting:

Marco57_3-1619206164517.png

I am getting:

Marco57_4-1619206190206.png

 

This is my data:

Marco57_0-1619206074611.png

 

As you can see, I can't sort X by Index as power bi is complaining:

Marco57_5-1619206257688.png

Which makes absolutely no sense at all. Why on eart would you not be able to sort 'X' by 'index' simply because 'X' has identical values for different values of 'index'. 'index' values are different and that's the key, I am asking to sort by a column which is having different values, where is the issue of doing this? If 'index' was containing duplicates, I would understand it is not able to sort 'X' according it but ut is exactly not the case here ... 

 

I tried two things here which did not work without even being able to understand why:

  • Creating a power query step to sort the data by increasing index. This should order X as well. The line chart visual is completely ignoring this upfront sorting by Power Query. Very strange why thus it would take it into account the sorting when the column is sorted according another one and not sorting from Power Query? There is absolutely not an ounce of sense here
  • Creating a concatenated column of index and x column:
    Marco57_6-1619206857733.png

    This would allow me sorting column Merged column according Index which indeed happens without error.

    But for sure this does not work and the line chart really needs the 'X' column to be sorted and not another one.

 

To be honnest I can't beleive in 2021 for a world classe tabular tool with vizualisations specilization we are not able to do such primitive manipulation.

 

I hope I am missing an obvious workaround that someone would know about.

Many thanks in advance for any support.

Rgds

Marc.

 

 

1 ACCEPTED SOLUTION

Hi @Marco57 ,

 

The current visualization don't allow you to do this however you can use the charticulator visualization to create this:

MFelix_1-1621461027534.png

https://appsource.microsoft.com/en-us/product/power-bi-visuals/wa200002793?tab=overview

https://powerbi.microsoft.com/en-us/blog/announcing-the-new-charticulator-visual-public-preview/

 

 

This needs some tweeking but overall result is has you need, if you want assistance please tell me.

 

Check the PBI file attach.

 

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @Marco57 ,

Sorry that I can't a good solution to achieve it. Here is a workaround: add Index field also in X axis as shown in below screenshot

yingyinr_0-1619431192165.png

Best Regards

Hello @Anonymous 

 

Thanks for your feedback but as you can see it does not result in the correct behaviour.

I think this should be a bug.

Rgds

Marc.

 

Anonymous
Not applicable

Hi @Marco57 ,

The X values didn't display sort by ascending if add index in X axis fields... I'm sorry I couldn't find a suitable way to fulfill your needs.

Best Regards

Hi @Marco57 ,

 

The current visualization don't allow you to do this however you can use the charticulator visualization to create this:

MFelix_1-1621461027534.png

https://appsource.microsoft.com/en-us/product/power-bi-visuals/wa200002793?tab=overview

https://powerbi.microsoft.com/en-us/blog/announcing-the-new-charticulator-visual-public-preview/

 

 

This needs some tweeking but overall result is has you need, if you want assistance please tell me.

 

Check the PBI file attach.

 

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.