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,
I am sure this has must have been addressed before, so I apologise in advance for failing to find the answer!
I want to add a green and red indicator icon to my Table visual, based on the result of a measure which returns a variance percentage of Sales vs Budget. I currently have the following measure to work out my variance on budget:
Variance On Budget = VAR __BASELINE_VALUE = SUM ( 'SalesFact'[Budget] ) VAR __VALUE_TO_COMPARE = SUM ( 'SalesFact'[Sales] ) RETURN DIVIDE ( __VALUE_TO_COMPARE - __BASELINE_VALUE, __BASELINE_VALUE )
I have then created 2nd measure to output the icon based on the result of the above:
Budget Indicator = IF ( [Variance On Budget] > 0, "http://server/green.png", "http://server/red.png" )
When I add the above measure to my table, I can see that it is correctly assigning green or red, however it is outputting the URL string. I therefore went to the Modelling ribbon to change the Data Category to "Image URL", however the Data Category drop down is greyed out:
Any help greatly appreciated!
Thanks
Mark
Hmm, I'll have to test if calculated columns can be data categorized. In the mean time, you might try the technique here:
Thanks for the link Greg. I had been looking at Unichar characters, but all the ones that you would normally wish for, eg a simple circle or arrows only seem to be in black. However I can use the icons in that post as a last resort.
Back to getting the images to work, I am new to Dax but was wondering if I could keep my two URLs in a unrelated table (ImageTable) with say 1 row and two columns ('Green' and 'Red'), with both marked as Image URL. So some pseudo code something like:
Budget Indicator = IF ( [Variance On Budget] > 0, FIRST(ImageTable[Green]), FIRST(ImageTable[Red]) )
Thoughts appreciated!
Mark
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 |