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 have a matrix visual which shows Installation Progress at two levels , at a state level and and on expanding ,at a city level.
When at state level, The value should be shown as an image to indicate the status. When expanded to City level, it should show the actual installation count.
I have managed to write a measure for the same :
Installs = var a = SUM('Summary_Matrix'[Installs])
var b = IF(ISBLANK(a),0,a)
var c= if(b >= 10000,3,if(b < 5000,1,2))
return IF(HASONEFILTER('City_Master'[City]),b,"https://sample.blob.core.windows.net/powerbi-images/" & c & ".PNG")
1.PNG,2.PNG and 3.PNG being the images in the blob.
I'm getting the desired output for the measure, But not able to categorize the measure as Image Url since it will return a number is some cases. Now The link is shown as text in the matrix. Is there anyway for it to categorize the measure based on the return value type.
Thanks in Advance.
Solved! Go to Solution.
To my knowledge this is not possible. A measure can only have a single data category, if you format the numbers to text you will be able to use the Image URL data category but that will also break the numeric values as the application will try to import all values as images.
There might be custom visuals that can allow this but I'm honestly not sure.
I would recommend layering two visuals ontop of eachother, one holding the images and another holding the numeric values. This should allow you to accomplish the same layout you're after.
Br,
J
Thanks All for your response. As mentioned by everyone, the requirement specified in the original query is not possible.
However for anyone interested in a workaround ,I was able to achieve this using the conditional formatting using icons feature and only applying it to the Totals and selecting layout as icon only.
hi @Anonymous
To my knowledge, it could not achieve in power bi for now, since measure is a dynamic summary value by current row context, it could not define a category for it.
Regards,
Lin
To my knowledge this is not possible. A measure can only have a single data category, if you format the numbers to text you will be able to use the Image URL data category but that will also break the numeric values as the application will try to import all values as images.
There might be custom visuals that can allow this but I'm honestly not sure.
I would recommend layering two visuals ontop of eachother, one holding the images and another holding the numeric values. This should allow you to accomplish the same layout you're after.
Br,
J
@Anonymous , Did not got it completely.
Check if Segmentation can help
https://www.daxpatterns.com/dynamic-segmentation/
https://www.daxpatterns.com/static-segmentation/
https://www.poweredsolutions.co/2020/01/11/dax-vs-power-query-static-segmentation-in-power-bi-dax-power-query/
https://radacad.com/grouping-and-binning-step-towards-better-data-visualization
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 |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |