March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I'm trying to create a column chart (specifically 100% stacked column chart). The labels along my X-axis are sample names, however when I create a chart Power BI creates what appears to be a random order and doesn't follow the order of the data table. The sample names contain both numbers and letters so are inputted as text values, and selecting "Sort by column" doesn't help. If I remove the letters, leaving just numbers, it arranges it numerically (which is fine) but leaves massive gaps along the number line because the nature of the samples means they're not consecutive numbers.
I've also tried creating a column of numbers and using "Sort by column" to sort the sample name column by the number...but no luck.
Suggestions?
Hi there,
You could possibly create an Index Column in Power Query on your table.
And then use this Index Column as your "Sort By Column" on your field? That should then create it in the correct order.
Is this what you are expecting or anything different.
Cheers
CheenuSing
I tried with my test table created based on your problem and i see the result as
Thanks @CheenuSing
Yes, and my issue was I needed it in particular order e.g. Sample 1, 1Gsample, 20 Test etc. using your example.
However I've gotten it to work using the "Sort by column" function, which I'd tried before so I don't know why it suddenly decided to work, but it does.
In case anyone else needs it: highlight the column of your x-axis data and select "Sort by column" then choose the column of numbers which are in the desired order.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
133 | |
90 | |
88 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
70 | |
68 |