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

View all the Fabric Data Days sessions on demand. View schedule

Reply
kamab
Regular Visitor

How to order slicer values by another column within each group of the current column

Hi everyone,

 

I have a table that looks like this:

WELL FORMATION DEPTH

AB_top1
AA_top2
AC_top3
BB_top45
BA_top48
BC_top50
CB_top101
CA_top120
CC_top135

 

 

 

In Power BI I want to build a slicer for FORMATION.


The issue: the slicer always shows the formations alphabetically, but I want them ordered by their depth within each well.

 

I tried creating a Formation_Order column using RANKX, but Power BI gives the error "There can’t be more than one value in Formation_Order for the same value in FORMATION" (because the same formation appears in multiple wells at different depths).

 

What’s the correct way to set up a slicer that respects the per-well depth order? Do I need to build a separate dimension table for slicer values, with WELL + FORMATION combined, and then sort by depth? Or is there a simpler trick to achieve this?

 

Thanks a lot for your help!

3 REPLIES 3
kamab
Regular Visitor

The good thing about slicer is that it doesn't show me the WELL names, I can just drop in FORMATIONs and then filter all the other plots by selecting any formation. In the example you have provided it shows all the wells, which I have 100s of.

You can not sort the formation on well depths if you don't include the wells.

lbendlin
Super User
Super User

Sorting by depth should be sufficient.

lbendlin_0-1759009003690.png

What's the benefit of the slicer?

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.