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! Request now

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
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.