Forum Discussion
Sorting slicer
- 1 year ago
Hi Anonymous
Thank you for reaching out to the Microsoft Community Forum regarding your query.
To sort a slicer that uses a column containing both numbers and text , please follow the steps below:
1. Create a new column in Power BI using the following DAX:Sort_Order =
VAR TryNum = IFERROR(VALUE('MetricTable'[Metric_Group]), BLANK())
RETURN
IF(
NOT ISBLANK(TryNum),
TryNum,
1000 + UNICODE(UPPER('MetricTable'[Metric_Group]))
)
2. In Data view, select the Metric_Group column and apply Sort by Column choose the Sort_Order column then use the Metric_Group column in slicer visual.I have also attached a snapshot and PBIX file for your reference please review it.
If my response has resolved your query, please mark it as the Accepted Solution to assist others. Additionally, a 'Kudos' would be appreciated if you found my response helpful.
Thank YouMicrosoft Fabric Community Support!
v-karpurapud That worked!!
Thank you for your help.