March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
89 | |
84 | |
70 | |
51 |
User | Count |
---|---|
206 | |
143 | |
97 | |
79 | |
68 |