This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hi all! My data is set up as below. Column 2 is just a placeholder for a bunch of columns that are not currently relevant. Abs Diff (or Absolute Difference) is the combined distance of Max and Min from Mean. So for Row 1, its |7 - 3| + |9 - 7| = 6. The Max and Min % Diff are just the percentage of the difference from the Mean. So for Row 2, Max % Diff is (9 - 2)/7 = 28%.
| Month | Category | Column 2 | Name | Min | Mean | Max | Abs Diff | Max % Diff | Min % Diff |
| Jan 2022 | A | adjasda | Item_X | 5 | 5 | 10 | 5 | 100% | 0% |
| Feb 2022 | B | afnsaofs | Item_Y | 3 | 7 | 9 | 6 | 28% | -57% |
| Mar 2022 | C | fdoshfsi | Item_Z | 2 | 6 | 6 | 4 | 0% | -66% |
I am plotting this on a stacked bar chart with the Name as the y-axis, Min and Max % Diff as the x-axis, and the Month and Category in slicers. The result is somewhat of a diverging bar chart, as seen below.
What I want to do is sort the chart by Abs Diff. I have tried sorting the Name column by the Abs Diff column, but I always get the error saying that you cannot sort by column if multiple values exist in one column for one value in the other. Any thoughts about how I could go about sorting this?
Solved! Go to Solution.
@Anonymous
If you add the ABS Dif to the tooltip on the visual you can then use it to sort the visual. In my example I am showing paid amount by Member ID but I have added co-pay to the tooltip so I can sort the chart by co-pay amount.
@Anonymous
If you add the ABS Dif to the tooltip on the visual you can then use it to sort the visual. In my example I am showing paid amount by Member ID but I have added co-pay to the tooltip so I can sort the chart by co-pay amount.
Worked like a charm, an absolute genius trick. Thank you good sir.
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 36 | |
| 29 | |
| 29 | |
| 21 | |
| 18 |
| User | Count |
|---|---|
| 71 | |
| 45 | |
| 33 | |
| 24 | |
| 23 |