The ART of Subtle ANIMATION in Power BI

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
I know not everybody is a big fan of having gifts in powerbi reports because well who wants to have a moving image that just distracts from the main visuals in the report however when used in the right places in the right way it can actually draw the attention to the right places and take your reports to the next level now in this video I'm going to show you how to set up this example over here where I have a gift for the upward and downward arrows to show a trend and this gift only looks once and only gets triggered when the user interacts with the report now let's see how it's [Applause] done welcome to how to powerbi my name is boss and if this is the very first time for you visiting this channel make sure to hit that subscribe button to stay up to date on all of my videos it which I share everything I know about powerbi all right now let's see what we're going to build so I want to have G gifts for the arrows that go up and down now why does it need to be a gift because I want to have a little bit of movement to draw attention to these arrows and to show the trend because that is the most important thing here so let's interact with the report and see these gifts in action I'm going to pick a different product for my slicer let's say Vell and you see the arrow moving in the downward Arrow come from the top the upward Arrow from the bottom and they only Loop one single time otherwise it would be way too much so it's just little extra Flame that brings Your Design to the next level and actually draws the attention to the right things but you don't overdo it okay now let's see how we set it up I'm going to start from scratch so let's get rid of these cards and now we can start from the beginning step one is to create a new card visual so it needs to be a new card visual meaning you need to be on one of the later versions of powerbi and then we can go here to the top and pick the new C visual there it is so let's insert insert it and let's resize it a little bit like this and now we can add the measures for which we want to have separate cards now in my case that's the sales for different countries not the measures I already created we have for example here sales USA we have sales Canada we have sales Mexico Germany and France you see for every measure we have a separate card now the next thing is to make it look a little bit better before we continue and add the images so I'm going to go here to formatting options and and first I go here to size and style and I don't want to have any background color so I turn the background off I keep the background of the cards themselves white just a clean look that's fine and then we can continue with the shape itself so I'm going to go here to shape and I would like to have rounded rectangles and actually I only want to have the top left rounded so I'm going to customize the style and then here say that for the top left corner just want to have a little bit of rounding so let's try that out and I think 10% looks quite okay so let's leave it at that and let's maybe also put in a little line on the left hand side which we can do by going here to cards and then scroll down and here we have accent bars and you see we have a nice little accent bar on the left hand side of the card now of course you can customize that further over here but for now it looks good enough now then the values the callout values I think the size is a little bit too much so let's make it a little bit smaller which can do by going here to call out and then here for all of the series we want to have the values a little bit smaller so I'm going to change it from 45 to maybe 28 and then instead of then I'm going to go for a different one let's choose sigui u i now here for label I want to have a different text at the moment it just shows sales followed by the country name now what would be nice if we use that label to show the percentage growth rate from the previous month which then later on needs to correspond to well are up or down now to do that we can ENT the text but this would be static as you can see now also we have to pay attention because when I type in your test it changes for all of them and of course the growth rate is going to be different for each single card okay so we have to change the series first so let me make the text box here empty again so that it goes in automatic then I change the series to sales USA and only for the USA I want to change the text but now we have to make that Dynamic using the FX button now that means we can use conditional formatting with a measure it sets the value of that label all right and that measure can show or calculate the percentage difference from previous month all right so let's create these measures I'm going to go VI to data and then I'm going to add a new measure and let's start with the label for USA so label USA which is going to be equal two now let's start with the value of the growth rate month over month which we can calculate by dividing the sales USA from this month with the sales USA previous month so sales USA previous month and 10 minus one now if I use this measure it will not look great as you will see in a second so I'm going to take my card visual go here to formatting again here we have the label section and we're going to use the FX button to now choose the field value now the field value we can set by the new measure that we just created now there it is label USA and oh we cannot we cannot even use it why because the output of that measure needs to be text and well what we return with this measure it's not text is a value all right so we have to go back take that measure and now we have to adjust it so that what gets returned is TX now one way to do that is by wrapping it inside of a format function which we will need anyways because we want to control how that value gets formatted and we can do that with custom formatting strings so we can write over here a bound symbol comma that means we're going to have thousand separator and then the zero that's the mandatory placeholder hashtags the pound symbol is the optional placeholder only when it's necessary to show the digit it will show it all right now then we don't want to have decimals so I'm going to leave it as this then we want to show it in percentages so I'm going to add a percentage sign close the quotation marks and that's it okay now let's see if we can use the measure right now okay so I'm going to go back to the formatting options again here we have the label section click here on the FX button and now we can choose it hopefully let's try it out yes now it works and now it shows 213% which is then the growth rate from previous month to this month okay now of course well the user doesn't know what it means so we have to add a little bit of text I'm going to go back take that label USA measure once more and here we can add some Texs at the beginning so for example we could say quotation Mar because it's text and then we want to have well the difference now the difference you often uh show by using a Delta icon all right so Windows key period Then you can choose the icon that you want now here's that Del icon I recently used it otherwise you have to scroll down a little bit okay now there it is and it's the percentage difference so I'm going to add here a percentage icon and then last month colon and then maybe also exra space now we can combine that with what we already wrote before so let's see how this looks now that looks much better now let's take that label and put it here at the bottom so I'm going to go once more here to format the series that selected is still sales USA and the label I want to have not above the value but below the value okay so now we have the label below the call out value but there's a problem we don't know anymore or we cannot see that the sales is the sales for United States because that was in the label before and now it's gone now either we have to add it also to that measure but it would not look that pretty and wouldn't be very clear so not a good option we can also not really add it to the main value the call out value so what else can we do well here for the standard options we don't get that far because even if I would go here to title and then here we can turn the title on and add the counter names to the titles of the card now let's add the first one USA and now I would like to have the next one but I cannot select the the next series so that means that this is the overall title now there's no individual title for each card which is a bit of a problem so we would have to Extra Spaces and then type in the next country for example Canada now here these Extra Spaces get removed unless you turn tax WB off you can of course push it further further further further further to the right until it is above the second card however you see H also not great now another option would be to well duplicate the card Visual and just well get rid of all of the extra elements and put it above it that would be another option now in this case just pick whatever you like the most okay so I just added all of these countries in the title now of course we could also have done this with a measure and exactly calculate how many Extra Spaces I need after each country but this is good enough for now all right now then let's go over here to text color then make it maybe a little bit more grayish so that doesn't draw too much attention and now we can just continue by adding also the labels to all of the other countries just like we did just did before for the UN United States so let me do this quickly all right now the crucial part which is the give image that I want to add to these cards and I want to have two one which is upward arrow and a downward pointing arrow and the thing is that the right one needs to show depending on the percentage growth rate okay now step one is to well find a give image or create one which we can do in PowerPoint you can create your own GI image now let's do this quickly I'm going to open PowerPoint Now to create one is actually really easy first of all I would pick the dimensions for the page more or less in correspondence to the image size that I want to have for my GIF so I'm going to go here to the design tab then here on the right hand side we have slide size 10 custom and over here let's just go for a square and here you can just put in the pixels so 1080 PX all right then for the height we can do the same so 1080 and you see it automatically transforms the pixels to centim or inches okay and click okay then once you have this you can go here to the top insert and then we can go for shape now here let's go for an arrow no the arrow are here now let's start with the downward pointing arrow and just draw it over here now make it as big as you want it to be I'm going to make it a little bit smaller than the page itself and then put it more or less in the middle and we can also play around with these yellow handles to make it less white and here we have another one all right and you make it exactly like you want it to be okay now once you have done that then also of course choose a nice color in this case I would like to have red or maybe you want to well have a gradient fill right so to do that we can go here also to shape fill and then here we can select that we want to have a gradient for example like this and no outline okay now if you want to set it up with a little bit more detail then of course you can also go to the image right click and then say here format shape fill and then here we can set up the gradient a little bit more exact so here we can say we want to have a gradient fill how the gradient should be what type of gradient and also here what I usually do with the ending point I would make totally transparent just like this the middle one maybe 70% all right and then play around with the start and ending points until you exactly have it like you want it to be okay now at the moment it's just a downward pointing Arrow now we have to introduce movement and that we can do with animations so let's go to animations open the animation pane then we have to select the arrow itself and now we can add animations that you see here at the top or you could actually also create your own one so you can also go here for lines and draw the line on which the animation should go so here we have always a start and ending point now at starting point I actually want to have all the way at the top so that the arrow starts basically above the page now it needs to go even higher so let me drag it even further up just like this and make sure it's more or less straight all right and then here for the ending point well now it ends a little bit too far so I'm going to drag it up and I want it to stop over there now just make sure that the line is straight and once you have everything set up then you can test the animation by clicking here on play from all right and there we have our error nice now the same thing we have to do for the upward error so let me do that quickly and now we have our two images with animation set up we have the upward error and downward error now the next thing that we want to do is go here to file and Export them as gifs so file then you go here to export and then here we have the option to create an animated gift here we can say what the quality should be now these gifts are going to be very small in the powerbi report however usually I still start with xal large and then compress it later on just so that I have more options and can decide at a later stage what the quality should be okay so I'm going to go for now for extra large then we have to say which slides so I only want to have the first one so slid one two one and create the GI just pick where you want to save it and save it and this we just repeat for the uport arrow as well so once more file export and then create an animated gif and now we want to have the second slide create GIF and save it okay and now we have already a gif but the problem is that it goes on an endless loop and here in PowerPoint I believe there's no option to say just Loop once and then stop so we need a different tool now one tool that allows you to do that well we just need a GI editor and one that is available for everybody is the following one over here and this one is called ASG so if you go to asg.com Loop count then you can choose over here your GIF now the one that we just created now start with ar down and then upload it now down you should be able to see the given action and you see it just keeps on looping looping looping however now we can set that Loop count to one and change it and you see there we have it just looping one time and we can make further changes here you can also crop it resize it rotate it optimize it now this is also something that I recommend you to do because you don't need a super perfect high quality give image we can just compress it so we can say Okay compress it a little bit for example over here 35 would be just a bit which is okay for now I click here on optimize gift and that gives us the gift that we can use in powerbi now let's try this so I'm going to go back to our report and then over here select the visualization go to formatting options and then we can go here to cards and if we scroll down there we have the option to add an image now that image you can add in two ways either image or image URL now image just means we can pick it from a location on a computer image URL means that we can host the picture somewhere and then use that URL that links to the picture now let's first go here for image browse and then choose the image that we just created the one where it only Loops one time and there they are we have our arrows for all of the cards now it looks a little bit weird also because of the image fit now let's change that to fit all right already looks a little bit better however they are all going down which is of course not true for all of them them well for the second one by coincidence it is but for the first one it actually should go up now that is well because we are not checking the growth rate we just need to have a measure that first checks the growth rate and then returns well either the upward Arrow or the downward Arrow so we need to have a measure and that also means that we have to go for that second option with the image URL because only that we can refer to in a measure and now we just need a place to host our images now where can you do this for free one option would be post images. org so I'm going to go to my browser I already open it up post images. org and here we can just say which images we want to host here so I'm going for my arrow down all right upload it and that's it here we have a direct link to that image now we can just copy that direct link the second one go back to pobi and I would create a new measure so let's call this one image and then arrow down which is going to be equal to and here we have the URL okay and the same thing we can then do for the upward Arrow okay so we created our gifs in PowerPoint then used a different GI additor tool to make sure it only Loops one time and maybe to also compress it a bit and then we found a place to host these gifts now that gave us a link and that link We Now put in two separate measures one called image AR down and one called image Arrow up all right good so now that we have that now the next step is to create a measure to show the right arrow based on the month over month growth so I'm going to add another measure now let's call this one give and then USA and we want to check if now let's put this on the next line and we want to check if the well USA sales is bigger than the sales for last month month okay then I would like to return well an arrow up and otherwise the arrow down so Arrow up is Drew and otherwise arrow down okay and then we can close that if function and now let's try it out let's go here to formatting for the C visual then go to guards and then look for the image section now here we have now chosen an image for my laptop the one that we created before but that is not a good option we have to go for image URL because then we can use a measure to dynamically switch between upward and downward Arrow okay so image URL and then here do not put in a link to well the upward or downward Arrow no we want to use that measure that figures out which one should show so field value measures and then we have the measure that we just wrote in this folder give USA there it is click okay now and now we have here for the first one an upward Arrow showing because we have well a positive value there for the month over month growth rate okay perfect and now we just have to do it for all of the other ones as well okay so that is done now let's try it out I'm going to pick over here at the top a different product for example V and now the arrrow come in just double check so over here that looks okay and if we we go for Montana then you see super nice effect the arrows just fly in however not completely correct because over here you see we have minus 100% what is that and why does it show an upward Arrow well there's a problem if there is no well either no current value for the month or no value for the previous month then we will have to watch out because then we get well a wrong result and upward hour shows minus 100% something is off and the same if I pick here G then we can say okay what should show when there blank I just put in two high for now you see we have also here the same problem now how to solve that well we just have to adjust the measures a little bit more let's go back for example to the USA one and here I probably would do two checks so first of all let's use variables and here we can say okay the first thing that we need to check is if the sales us is not empty and sales us a previous month is not empty so not is blank and then here we have the first one and not is blank and then the other one as well so let me copy that over there so that's the first one and then for the second one we can check if it's positive so I just call it positive and then here we have is the USA a sales this month bigger than the USA sales from previous month okay and then the last one that is then for the icon itself and then here we can let's maybe use a switch function so I'm going to change this to switch then we have true and then we can check if it's positive and not empty so not not not empty then I would like to have the upward Arrow so this one over here and then the second thing that I want to check for is whether it's well not positive so we can just put not in front of it and also here it should not be empty either one of them has current sales and previous sales should not be empty then I would like to have the arrow down okay and if none of these conditions are true so when it's zero then I would like to have well quation Mark space quation mark when there's no grow at all no difference okay and when we use variables then we need to say return and then the ion okay now let's just change the formatting let's in this just like this all right and the same problem we also have with the label so I'm going to copy this part then go here to label us and then here I just want to put in this if condition so that we have both these components and if that is the case only then return the label okay okay so now we do this for all of the other countries as well and then after adjusting the measures you will see for the us there we have no Arrow going up No Label because well there's current sales for the current month but not for the previous month so therefore we cannot correctly show a label or the arrow now for Mexico there we don't have any current month sales value so therefore well nothing shows okay now and that's it now let's try it out let's click here also on the other products to see if it's working the arrows nicely fly in when we interact with the slices and also here with the timeline when we change the time frame see perfect now in this way we have that nice little extra effect that can really uplift the design of the report and well actually draws the attention of the users to the right places because I do want the attention of the user to go to the trend to see if it's positive or negative okay now let me know your thoughts what do you think and if you have any questions just put it in the comment section below and there's also design training coming up so if you want to build reports together with me and learn all of my secrets make sure to check it out so that you learn how to build reports and make all of your colleagues happy and thank you for watching and see you in the next video
Info
Channel: How to Power BI
Views: 68,765
Rating: undefined out of 5
Keywords: power bi, powerbi, howtopowerbi, datatraining, datatraining.io, bas dohmen, card visual, new card visual, kpi card, gif, gifs, power bi gifs, images, power bi design, design, power bi animation, moving images, power bi visualisation
Id: MbPmCr4tfvk
Channel Id: undefined
Length: 24min 46sec (1486 seconds)
Published: Wed Sep 20 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.