Replace Average Ratings With Star symbols
Display different colours for different range of ratings
It would be a best practice to show visuals rather than numbers. In Power BI we can replace the numerical values of ratings with unicode symbols.
The Following DAX Measure helps to create the star ratings equivalent to the numerical value
DAX code for converting numerical values into stars
If you look at the above code , I have stored the calculation of average expression into variable _avg . It helps to prevent Power BI in evaluating the same expression again and make your DAX code more efficient
If you follow the above steps your value will be perfect but that would be in black colour. In order to differentiate rating you can follow the following steps,
1. Click on Format Pane > Cell Element > choose the column you wish to change colour(In our case Average Ratings)
2. Under that you could see Font Colour. In function Expression (fx) choose your choice of colour . I followed the following Steps
Now your Table or visuals with the Measure gets populated with Star based Ratings with different colour for different ratings
You can visit the following website for Unicode symbols http://xahlee.info/comp/unicode_stars.html
Subscribe to my newsletter
Read articles from Santhiya directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Santhiya
Santhiya
Hi, I am Santhiya, a dedicated Data Analyst with a strong focus on Power BI development. As a seasoned Power BI Developer with a robust background in architecting Power BI solutions tailored to project requirements, I excel in crafting effective, performance-optimized data models, dashboards, and reports. My journey began with gaining foundational skills in Python, which have greatly supported my data analysis endeavors. This experience enables me to leverage Python for essential data processing, integration, and automation tasks, enhancing the overall effectiveness of my Power BI solutions. With a keen eye for detail and a commitment to delivering high-quality insights, I am dedicated to transforming data into actionable intelligence and driving informed decision-making and business growth.