Forum Discussion
How to enable sorting by colour indicators in a table without labels
I’m working on a Power BI table visual that uses conditional formatting (colour indicators such as green, red, yellow) to show status for various fields (e.g. Usage Rate, Below Average Last 3 Months, etc.). The colours are working well, but I’ve noticed that unless I display a label or value in the field, users can't sort the column by clicking on it.
Is there a way to allow users to sort the table by these columns (based on the logic behind the colours) without having to show a text or numeric label? Ideally, I want the table to remain clean, showing only the colour indicators, but still be sortable.
Any suggestions would be greatly appreciated!
Thanks in advance.
Pablo
Thanks for your prompt response
Hi pabloignacio123 ,
Thank you for the detailed explanation earlier it was really helpful.
I’ve implemented the logic as discussed and have uploaded a sample PBIX file for your review. Could you please take a look and let us know if it’s working as expected, or if there’s anything that might need adjustment?
Looking forward to your feedback.
Best regards,
Lakshmi
Create a calculated column Status_Code based on Usage RangeStatus_Code =
SWITCH (
TRUE (),
[Usage_Range] >= 0.8, "V",
[Usage_Range] >= 0.5, "A",
"R")
7 Replies
- v-lgarikapatCommunity Support
Hi pabloignacio123 ,
Thanks for reaching out to the Microsoft fabric community forum.
To better understand the issue and build the appropriate logic, it would be very helpful if you could share some sample data that fully represents the problem or question you're referring to.
Kindly ensure the data is:
In a usable format (e.g., Excel or CSV), rather than a screenshot
Free of any sensitive or unrelated information
Looking forward to your response.
Best regards,
Lakshmi Narayana- pabloignacio123Regular Visitor
Dear Lakshmi,
Thank you for your prompt response and for your willingness to help.
To clarify my question: I am working with a table visual in Power BI where I use conditional formatting (specifically colour indicators—green, yellow, and red) to reflect statuses such as “Usage Rate” or “Performance over the Last 3 Months.” These indicators are based on DAX measures that evaluate specific thresholds or trends.
The colours are displaying correctly; however, I’ve noticed that unless I show a numeric or text label within the cell, users are unable to sort the column by clicking on the header. My aim is to keep the table visually clean—showing only the coloured indicator (for example, a coloured circle or background)—but still allow sorting based on the logic that determines the colour.
Would you happen to know if there is a way to enable sorting in this context, perhaps by linking the conditional formatting logic to a hidden or supporting field?
Please let me know if it would be helpful to share a sample file. I’m happy to prepare one accordingly.
Best regards,
Pablo- dm-pSuper User
Hi pabloignacio123,
Have you considered setting conditional formatting on both the font color and the background color? Having a useful value in the cell (albeit colored out) can help from an accessibility perspective if you have users who use a screen reader, but will still provide the cosmetic effect you want.
Regards,
Daniel