Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi,
I use DAX to make a dimension table as following as my slicer. But I'm wondering how to sort when showing as the slicer?
Solved! Go to Solution.
Hi @YunJ ,
If you use the original column to sort by the Index column created with Dax, it will produce a circular dependency.
https://community.powerbi.com/t5/Desktop/Circular-dependancy-error-creating-relationship/m-p/415732
Can you consider Create calculated table, and then sort by the new columns [Beauty Category] and [Index] in Table2.
Table 2 =
SUMMARIZE('Table','Table'[Beauty Category],"Index",
SWITCH(
TRUE(),
'Table'[Beauty Category]="Hair",1,
'Table'[Beauty Category]="Makeup",3,
'Table'[Beauty Category]="Female Skincare",4,
'Table'[Beauty Category]="Men",2))
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @YunJ ,
If you use the original column to sort by the Index column created with Dax, it will produce a circular dependency.
https://community.powerbi.com/t5/Desktop/Circular-dependancy-error-creating-relationship/m-p/415732
Can you consider Create calculated table, and then sort by the new columns [Beauty Category] and [Index] in Table2.
Table 2 =
SUMMARIZE('Table','Table'[Beauty Category],"Index",
SWITCH(
TRUE(),
'Table'[Beauty Category]="Hair",1,
'Table'[Beauty Category]="Makeup",3,
'Table'[Beauty Category]="Female Skincare",4,
'Table'[Beauty Category]="Men",2))
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @YunJ ,
You can enter the Power query to customize the sort order of the specified columns
1. Add Column – Column From Examples – From Selection
2. Custom order rules
3. Select the column [Beauty Category], Column tools – Sort by column – [Custom]
4. Result.
The sorting of slicers also changes.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I cannot find my table in power query because it is a table written by DAX.
Thanks
Hi, May I ask how to add an index column at this situation?
Hi @mussaenda
Thanks for your reply.
In your way I can only use the "column" column as a slicer. I'm wondering is there a way I can use the original "Beauty Category" as my slicer? (Because I already use this column to make relationship and create many measures and visualizations.)
HI @YunJ ,
The slicers get sorted by themselves. Like in the case above, your slicer is sorted in alphabetical order.
Do you want to sort them in a custom order apart from this default alphabetical order?
Thanks,
Pragati
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
84 | |
78 | |
52 | |
38 | |
35 |
User | Count |
---|---|
93 | |
73 | |
55 | |
52 | |
46 |