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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Amilks
Regular Visitor

Reverse order of X axis in PowerKPI 2.0 visual

I'm having trouble with the Power KPI 2.0 visual. I need to sort the X axis in what would be reverse order with 0 appearing on the right hand side and am not finding any way to do such.

Amilks_1-1657838036977.png

I need this to read 50 to 0 

The KPI 2.0 visual doesn't have the option to change sort axis in the option menu 

Amilks_0-1657837772546.png

 

The X axis is a simple mapping table that displays values from 0 - 150. I have changed the sort order in the Transform data tab and created a seperate column in the mapping table that is in reverse order to have the a axis values sorted in that way. Neither way keeps the sort order when it is used in the visual. 

 

The only reason I am using the Pro KPI 2.0 visual is to have an area with line chart as a visual. This is the solution I found searching this forum, in case there is another way to display area and line that could also solve this problem. 

 

Thanks!

 

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

Hi, @Amilks ;

You could Transform data then sort dec and add index.

vyalanwumsft_0-1658204391273.pngvyalanwumsft_1-1658204408486.png

Then select the value column and sort by index column.

vyalanwumsft_2-1658204462926.png


Best Regards,
Community Support Team _ Yalan Wu
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

4 REPLIES 4
v-yalanwu-msft
Community Support
Community Support

Hi, @Amilks ;

You could Transform data then sort dec and add index.

vyalanwumsft_0-1658204391273.pngvyalanwumsft_1-1658204408486.png

Then select the value column and sort by index column.

vyalanwumsft_2-1658204462926.png


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello @v-yalanwu-msft 

 

Thank you for looking into this. I had tried to hand code a column index that could sort the column that I wanted to use as my X - Axis. I still wasn't able to control how the Power KPI 2.0 visual was sorting the axis. What I found that fixed the issue was changing the axis data type from Continuous to Categorical and then the visual was able to pick up the ordering that I had defined with the column. 

Amilks_0-1658361605840.png

 

Amilks
Regular Visitor

Hi @amitchandak and thanks for looking into this!

 

I tried the DAX for Column Sort but ended up with a circular dependency. I assume that the sort column needs to reside in the same table as the axis column, but PowerBI is unhappy that I am using my axis column to generate the sort column and then using it to sort the axis. 

amitchandak
Super User
Super User

@Amilks , Create sort column and use that and try

 

Column 1 =  [Your Axis Column]

 

Column Sort = rankx(table, [Your Axis Column],,desc,dense)

 

Mark Column sort as sort column of column1 and use column1 on axis 

 

How to Create Sort Column and Solve Related Errors:
https://www.youtube.com/watch?v=KK1zu4MBb-c

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.

Top Solution Authors