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
YYlee
Helper I
Helper I

Custom Sort axis

YYlee_0-1723788106330.png

YYlee_1-1723788226845.png

I want to remove the 1.2.3. (which I added manually in the database) and sort by Delivery, CE, Firm, and Total. I’ve created a custom sort table to define the sort order. However, I think because the "Total" is created using a measure (as shown above), and I’ve linked the 311 category total to the new table and selected it on the axis, the "Total" is not appearing on my clustered chart.

 

What steps should I take to remove the 1.2.3. and ensure that the "Total" is displayed correctly?

 

Thanks. 

 

Regards, 

YY

 

6 REPLIES 6
SamWiseOwl
Super User
Super User

Hi @YYlee 

Can you show us the measure please.

My guess is you need to remove the new filter caused by the sorting column.

For example if I had the Month Name and sorted by the Month Number I have to remove both filters to return the total:

All Month sales =
Calculate( [Sum Quantity], AllSelected(calendar[Month],Calendar[Month Name])


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

Hi Sam,

 

Which measure you mean?

Hi @YYlee this one:
However, I think because the "Total" is created using a measure


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

Measure 2 = if(SELECTEDVALUE('New Table'[Categories])="Total",CALCULATE(SUM('Total'[Week per month]),ALL('New Table'[Categories])),SUM(Total[Week per month]))

Hi @YYlee I would assume something like this:
Total Measure = 
if(
SELECTEDVALUE('311 category total[311 category total])="Total" --if new column is total
,CALCULATE(--Change the filters

                  SUM('Total'[Week per month]) --sum this

                         ALL('311 category total')) --remove the filter from new table

,SUM(Total[Week per month])) --Otherwise sum current filter


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

Dear Sam, 

 

I have created the new measure but the "Total" amount does not automactically count and show in the chart

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.