Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have a demand to show the system's available status.
Here is the expected output below.
Due to some reasons, I must use 'shapes' to present the availability ( and seems this is the only way to do that ). As you can see the blue & red circles above, a green circle means good, and a red circle means something wrong.
Right now, all these 'shapes' and color are changed manually.
But what I need is that the circles able to change its color automatically based on values from the database table.
May I know how to change the shape's color based on the values? Thanks.
Solved! Go to Solution.
You can use create a measure that generates a SVG image of a circle. ease see sample pbix
Circle =
VAR __RAND =
ISODD ( SELECTEDVALUE ( 'Table'[Random] ) )
VAR _color =
IF ( __RAND, "red", "green" ) --replace with the desired color, you can use hex or RGB
VAR LeftPad = 0
VAR UpperPad = 5
VAR _Pad = LeftPad & ", " & UpperPad
VAR _circle = "<circle cx='50' cy='50' r='40' fill='" & _color & "' transform='translate(" & _Pad & ")' />"
VAR _vbSize = " 110 110 " -- reduce to increase circle size
VAR svg = "data:image/svg+xml;utf8," & "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 " & _vbSize & "'>" & _circle & "</svg>"
RETURN
svg
Hi @DongdongYu
You can try below video for better understanding
https://www.youtube.com/watch?v=MGcYfCpwDds
https://www.youtube.com/watch?v=lfqPpUdtTss
https://www.youtube.com/watch?v=gCbBarkiH3c
https://www.youtube.com/watch?v=o2jSUHU722w
I hope combination of above videos will help you to resloved your issue!.
You should be able to use conditional formatting with icons.
Thanks, but 'condition formatting' cannot change the dot size.
You can use create a measure that generates a SVG image of a circle. ease see sample pbix
Circle =
VAR __RAND =
ISODD ( SELECTEDVALUE ( 'Table'[Random] ) )
VAR _color =
IF ( __RAND, "red", "green" ) --replace with the desired color, you can use hex or RGB
VAR LeftPad = 0
VAR UpperPad = 5
VAR _Pad = LeftPad & ", " & UpperPad
VAR _circle = "<circle cx='50' cy='50' r='40' fill='" & _color & "' transform='translate(" & _Pad & ")' />"
VAR _vbSize = " 110 110 " -- reduce to increase circle size
VAR svg = "data:image/svg+xml;utf8," & "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 " & _vbSize & "'>" & _circle & "</svg>"
RETURN
svg
You can use a method similar to the one described here: https://www.sqlbi.com/articles/creating-custom-visuals-in-power-bi-with-dax/
Basically, you will need to create a measure that returns a different colour / size of circle based on the values in your data - check the section called "Making the SVG dynamic with DAX"
Thanks, I'll try it.
I know I can use 'table' and apply 'condition formatting' to present the status, but unfortunately, in this way, I can't change the size and shape of the points. So I was wondering how can I use 'shape' to achieve my target.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
63 | |
63 | |
53 | |
39 | |
25 |
User | Count |
---|---|
85 | |
57 | |
45 | |
43 | |
38 |