Forum Discussion
Sort Visual on Field Parameter
- 2 years ago
Step by step solution:
Step 1: Create the Blank Measure
- Go to the "Modeling" tab in Power BI Desktop.
- Click on "New Measure."
- Name the measure (e.g., SortBlankMeasure) and use the following DAX formula:
Create a New Measure:
SortBlankMeasure = BLANK()
Step 2: Add the Blank Measure to the Chart
Select Your Visual:
- Click on the visual (chart or table) where you want to apply the sorting.
Access the Fields Pane:
- In the Visualizations pane on the right side, you'll see a section called "Fields."
- This section shows the fields and measures currently used in the visual.
Add the Blank Measure to the Tooltip:
- Scroll down to find the "Tooltip" area within the Fields section.
- Drag the SortBlankMeasure from the Fields list and drop it into the "Tooltip" section.
Note: The Tooltip section is usually at the bottom of the Fields pane. If you don’t see the Tooltip section, it’s possible that the visual you’re using doesn’t support tooltips, in which case this method may not be applicable.
Step 3: Sort the Visual by the Blank Measure
- Sort the Visual:
- Once the blank measure is added to the Tooltip, click on the three dots (ellipsis) at the top-right corner of the visual to access the "Sort by" options.
- You should now see the SortBlankMeasure as one of the sorting options.
- Choose to sort the visual by SortBlankMeasure.
I used another workaround - I added a blank measure to the charts tooltip and sorted by this measure. Somehow it works.
- magiccharts2 years agoNew Member
Step by step solution:
Step 1: Create the Blank Measure
- Go to the "Modeling" tab in Power BI Desktop.
- Click on "New Measure."
- Name the measure (e.g., SortBlankMeasure) and use the following DAX formula:
Create a New Measure:
SortBlankMeasure = BLANK()
Step 2: Add the Blank Measure to the Chart
Select Your Visual:
- Click on the visual (chart or table) where you want to apply the sorting.
Access the Fields Pane:
- In the Visualizations pane on the right side, you'll see a section called "Fields."
- This section shows the fields and measures currently used in the visual.
Add the Blank Measure to the Tooltip:
- Scroll down to find the "Tooltip" area within the Fields section.
- Drag the SortBlankMeasure from the Fields list and drop it into the "Tooltip" section.
Note: The Tooltip section is usually at the bottom of the Fields pane. If you don’t see the Tooltip section, it’s possible that the visual you’re using doesn’t support tooltips, in which case this method may not be applicable.
Step 3: Sort the Visual by the Blank Measure
- Sort the Visual:
- Once the blank measure is added to the Tooltip, click on the three dots (ellipsis) at the top-right corner of the visual to access the "Sort by" options.
- You should now see the SortBlankMeasure as one of the sorting options.
- Choose to sort the visual by SortBlankMeasure.
- Anonymous1 year agoNot applicable
I cannot believe this magic works like a charm! 😊
magicchart, you have saved all PBI developers around the world who were frustrated, scratching their heads, and wondering why this seemingly minor bug has not yet been fixed by one of the world's most magnificent companies.
In the age of Gen AI, I am not sure if they would guide me to a solution like this... Anyway, thanks a ton! magiccharts
- Anonymous1 year agoNot applicable
It WORKS! But how?!
- Anonymous3 years agoNot applicable
This is the easiest workaround and it works. I tried other workarounds, but they don't work for me. Maybe because I use columns from the same table in field parameters. Thanks, Josz!
- Tummi3 years agoFrequent Visitor
Would you be able to show me an example of how you would do this? I'm having difficulty trying to figure out how to sort this field parameter.
- Anonymous3 years agoNot applicable
Can you pls explain how to do that? Thanks in advance.
- MVeatch3 years agoFrequent Visitor
This solved my issues...thanks for sharing!!!
- Winniethewinner3 years agoHelper IV
This works like a magic. Thanks for sharing!