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.
Is it possible to blink or flash data absed on a specific condition.
For eg: I am building a report to track status of a bunch of processes. I need to flash a process if its at risk to draw attention. I could sue conditional formatting to display a specific color in such situations but the cocnern is there are large number of processes and a lot of statuses associated. The ones at Risk need immediate attention so a blinking image or icon could help.
Is this posible,
Solved! Go to Solution.
I posted it to the the Quick Measure gallery here:
You can download the PBIX file to see it in a visual.
Hello,
We tried the solutions in this post and found they are more suited to adding lots of shapes as a column in a table.
Great solutions, but we were looking for something slightly different - just making a blinking shape, that responds to changes in data, which can be placed as an object on top of a map. In case anyone is looking for this, I've laid out our method below.
Note that this won't be suitable for some environments; it works in Power BI Desktop with the .pbix file open, which is exactly what we needed. For a published report in the web browser, you will find that the auto refresh rate might be automatically adjusted (particularly if you're not using Premium) and the image won't blink as quickly as this.
1. Define a measure to make a colour change, in response to current time:
BlinkGreen = calculate(if(mod(second(UTCNOW()),4)>1,"#90ee90","White"))
- Format by = Field Value; Based on field = BlinkGreen [or whatever you called your measure]
4. Configure your colours
- instead of pointing to a fixed hex code as above, you can now point your 'Blink...' measure to alternative measures or column results, so that the blinking colour will respond dynamically to your data.
- e.g. we used a 'StatusColour' measure to make some statuses show as green and others red [there's lots of posts on how to do this already]; we then replaced the hex code in the above 'BlinkGreen' measure with this 'StatusColour' measure, to make a 'BlinkStatus' measure
BlinkStatus = calculate(if(mod(second(UTCNOW()),4)>1,[StatusColour],"White"))
- tip: when formatting a shape, we used the 'StatusColour' measure for the outline, and 'BlinkStatus' measure as the fill colour - so the outline stays solid but its colour always matches the blinking centre
5. Set auto refresh
- select the background of your page, go to formatting, set Page refresh = On, set refresh to once per second
You should now have a blinking shape! 😸
Hey,
I guess you can use some of the svg data visualizations, you can a more detailed description how to use svg in a table or matrix visual here:
This measure (don't forget to set the data category to image url):
dancing donut = var svgChart = "data:image/svg+xml;utf8,<svg xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:cc='http://creativecommons.org/ns#' xmlns:svg='http://www.w3.org/2000/svg' xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='-4 -4 8 8'> <title>SVG animation using SMIL</title> <circle cx='0' cy='1' r='2' stroke='red' fill='none'> <animateTransform attributeName='transform' attributeType='XML' type='rotate' from='0' to='360' begin='0s' dur='1s' repeatCount='indefinite'/> </circle> </svg> " return svgChart
creates a moving donut, basically you can use any animation you can create with pure css/svg.
From my point of view motion should be used sparingly to avoid diverson, but also provides the means to direct attention.
Hopefully this provides you an idea.
Regards,
Tom
Thank you for the response Tom. I ll take a look at the details you ve shared
Here is a blinking dot:
Measure 2 = VAR __color = "Red" VAR __radius = 9 VAR __opacity = 1 VAR __rand = RAND() VAR __header = "data:image/svg+xml;utf8," & "<svg xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:cc='http://creativecommons.org/ns#' xmlns:svg='http://www.w3.org/2000/svg' xmlns='http://www.w3.org/2000/svg' width='100%' height='100%'> <title>SVG animation using SMIL</title>" VAR __footer = "</svg>" VAR __shapeTextCircle = "<circle cx='10' cy='20' r='" & __radius & "' fill='" & __color & "' fill-opacity='" & __opacity & "'> " & "<animate attributeName='opacity' from='1' to='0' dur='1s' begin='0s' repeatCount='indefinite'/></circle>" RETURN __header & __shapeTextCircle & __footer
Thank you for the response. Greg.
Is there a way you could show me how to use it in a visualization tool? Sorry I am new to Power BI and might be missing a basic information.
I tried to display it on couple of visualizations but its shows the code within the Measure. I changed the data type to multplie different type but dint help.
I posted it to the the Quick Measure gallery here:
You can download the PBIX file to see it in a visual.
Hi Greg,
Good day! Is there a prerequisite in making this work? I downloaded your .pbix, tried a few things (like removing some properties or the if part) and it works right away but when I paste it as a measure in my own project, the matrix shows the code inside VAR_HEADER instead of the dot.
Thanks in advance!
Sorry, forgot to set data category to image URL. Thanks!
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 |
---|---|
114 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |