Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All,
I will be thankful in advance for someone 's experience if they can share for below scenario:
I need to create a visual in my report showing one picture out of 3 pictures but picture is selected on the basis of percentage value of a specific measure.
For example ( Like conditional formatting in excel but not formatting but displaying picture )
I am surprised not to find any help anywhere as all videos and solutions are talking about URL option. How can I fit URL option in this scenario and if any help or link someone can share, will be ideal.
Hope I explained well and above scenario is simplied version of what I am facing. But if you feel you need some more explanation please feel free to ask.
Thanks again for your much needed urgent help.
Regards
Solved! Go to Solution.
Hi @Anonymous ,
We can try to use the following measure to meet your requirement (we use the url of forum's default avatars as an example)
Icon =
IF (
[X measure] < 0.6,
"/t5/image/serverpage/avatar-name/skyscraper/avatar-theme/candy/avatar-collection/architecture/avatar-display-size/message/version/2?xdesc=1.0",
IF (
[X measure] < 0.8,
"/t5/image/serverpage/avatar-name/castle/avatar-theme/candy/avatar-collection/architecture/avatar-display-size/message/version/2?xdesc=1.0",
"/t5/image/serverpage/avatar-name/modern/avatar-theme/candy/avatar-collection/architecture/avatar-display-size/message/version/2?xdesc=1.0"
)
)
If it doesn't meet your requirement, Could you please show the exact expected result based on the Tables that we have shared?
Best regards,
Sure, you can set a measure to be a Data Category of Image URL and then you just need to return the correct Image URL based on the calculation. Or you can return an SVG image. Or just use the built-in conditional formatting icons.
Thanks very much for such a prompt reply.
Can you please elaborate a bit on
set a measure to be a Data Category of Image URL and then you just need to return the correct Image URL based on the calculation.
I understand data category of Image URL but writing DAX to bring correct URL is causing problem
I have written DAX as below to display RECTANGLE or TRIANGLE -- ignored SQUARE, just so it runs atleast
IconFlag = SWITCH(True()
,CALCULATE(DISTINCT(tbl_Icons[IconURL])
,FILTER(tbl_Icons
,CONTAINSROW(
{IF( [X measure] <= 0.60,"RectangleURL","TriangleURL")}
,tbl_Icons[IconURL]
)))=1
,1,0)
where tbl_Icons contain RectangleURL, TriangleURL and SquareURL.
I followed instructions from
https://visualbi.com/blogs/microsoft/powerbi/dynamically-display-images-power-bi/
Can you please help writing DAX to dynamically select image on the basis of measure value.
regards
Hi @Anonymous ,
We can try to use the following measure to meet your requirement (we use the url of forum's default avatars as an example)
Icon =
IF (
[X measure] < 0.6,
"/t5/image/serverpage/avatar-name/skyscraper/avatar-theme/candy/avatar-collection/architecture/avatar-display-size/message/version/2?xdesc=1.0",
IF (
[X measure] < 0.8,
"/t5/image/serverpage/avatar-name/castle/avatar-theme/candy/avatar-collection/architecture/avatar-display-size/message/version/2?xdesc=1.0",
"/t5/image/serverpage/avatar-name/modern/avatar-theme/candy/avatar-collection/architecture/avatar-display-size/message/version/2?xdesc=1.0"
)
)
If it doesn't meet your requirement, Could you please show the exact expected result based on the Tables that we have shared?
Best regards,
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
98 | |
78 | |
65 | |
53 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |