cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RyanDennehy95
Regular Visitor

Custom Sorting Legend

Hi There,

 

I have a chart (see attached) that displays totals for one year vs the other i.e FY23/FY22.

 

I want to have the data sorted so that the outcomes i.e promoted/demoted etc are side by side for comparitive purposes. Is this possible to move them side by side ?

 

Appreciate any help here 🙂

 

Capture.PNG

1 ACCEPTED SOLUTION

@RyanDennehy95 You need to set your original Outcomes column to have a Sort By column of Outcome Sort. You do this in the Column tools tab of the ribbon. Then, you use your original Outcome column in your visualization and it will be sorted in the order of Outcome Sort column.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

4 REPLIES 4
RyanDennehy95
Regular Visitor

ohh apologies think im mistaken -- i still use original outcome column but sort it by outcome sort ?

Greg_Deckler
Super User
Super User

@RyanDennehy95 In Power Query, duplicate your Outcome column. Then, create a calculated column in DAX like this:

Outcome Sort = 
  SWITCH('Table'[Outcome Dup],
    "FY22 Demoted",1,
    "FY22 Promoted",2,
    "FY22 Failed",3,
    "FY22 Maintained,4,
    "FY23 Demoted",5,
    "FY23 Promoted",6,
    "FY23 Failed",7,
    "FY23 Maintained,8
  )

Set the Sort By column for Outcome to Outcome Sort.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Thanks @Greg_Deckler this has worked however it has now changed the outcome names to 1,2,3,4,5,6,7,8 as a result.

 

Any reason for this ?

 

Capture.PNG

@RyanDennehy95 You need to set your original Outcomes column to have a Sort By column of Outcome Sort. You do this in the Column tools tab of the ribbon. Then, you use your original Outcome column in your visualization and it will be sorted in the order of Outcome Sort column.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

BizApps LATAM 2023

Business Application LATAM Summit 2023

Join the biggest FREE Business Applications Event in LATAM this February.

Power Platform Bootcamp

Global Power Platform Bootcamp

In this bootcamp we will deep-dive into Microsoft’s Power Platform stack with hands-on sessions and labs, delivered to you by experts and community leaders.