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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
ElectroHH
Frequent Visitor

Sorting Measure instead of columns | liveConnection | custom ranking

Hi Community,

I currently face a new problem and need your help. Most of the time I work with the import method for Power BI Reports, but this time I have a LiveConnection and face new issues as I am not allowed as a Admin on the database (data warehouse) and cannot work / sort the columns and need a measure.

The situation is followed:

I want to custom sort a chart but don't know how without making 1) a mapping table in the back. 2) I also cannot sort the underlying column as it is on the DWH. 

 

ElectroHH_0-1689067969252.png

 

Solution number 3 would be a measure which says:

column value "not valid" is 1, "low" is 2, "medium" is 3, "high" is 4, "very high" is 5 or something like this... because then I can use this measure to show on the graph and sort it ascending / descending. 🙂


Could you provide some tips or maybe a measure which does that?

This would help very much!


Thanks in advance, Electrohh

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

Hi @ElectroHH ,

 

Please try:

Measure =
SWITCH (
    SELECTEDVALUE ( Sampledata[Type] ),
    "not valid", 1,
    "low", 2,
    "medium", 3,
    "high", 4,
    "very high", 5
)

Then apply the measure to the visual's tooltips:

vjianbolimsft_0-1689227454820.png

Sort by measure:

vjianbolimsft_1-1689227483675.png

Best Regards,

Jianbo Li

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

1 REPLY 1
v-jianboli-msft
Community Support
Community Support

Hi @ElectroHH ,

 

Please try:

Measure =
SWITCH (
    SELECTEDVALUE ( Sampledata[Type] ),
    "not valid", 1,
    "low", 2,
    "medium", 3,
    "high", 4,
    "very high", 5
)

Then apply the measure to the visual's tooltips:

vjianbolimsft_0-1689227454820.png

Sort by measure:

vjianbolimsft_1-1689227483675.png

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.