Transforming a table into a fancy bar chart - Power BI

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone my name is mara and welcome to data pairs today i'm going to be showing you a tutorial on how you can transform a table or a matrix into a bar chart this might sound crazy for some of you but yes it is possible just need to be a little bit creative i know a lot of people love tables and they just love to do everything they can in a table or a matrix and i just want to give you some ideas on how to improve your visuals even if you want to use a table there are there is conditional formatting there is like a lot of things that you can do to make your table a lot more insightful in this case to make your table look like a bar chart that can still provide you a lot of insights but it's a lot easier to read than a table this is like a normal table probably are familiar with it or matrix and this is the visual that i'm going to build i know it looks exactly like a bar chart but it's not a bar chart it's actually a table let's jump into the tutorial and i'll see you there so here we are in power bi desktop and i just wanted to show you how the solution actually looks like when a user is interacting with the report this is my very nice bar chart or table or matrix you can see that this works perfectly fine with the filters i can select whatever filters i want and still it shows me like the flag and all the values and all of that i just wanted to show you how a table would look like in this case which is this example below if i didn't do any formatting to my table this is what it would look like and unfortunately i see this a lot and i don't really like it what we are going to do is to transform this table here into this kind of bar chart or our kind of fake bar chart i'm going to open a new page or create a new blank page i'm just going to copy i'm going to be lazy and copy this oops that's not exactly what i wanted to do i just deleted the page by accident let's create the page the blank page again and i'm going to start with this table so i'm just going to copy paste a table this is what we would have if we left this as a table and i know some of you are probably asking yourselves why would i want to use this instead of a bar chart if i want a bar chart i will just use the bar charts the problem is if i go back sorry if i'm going back and forward but i really want to explain this part you see that is a lot of extra information here you have a flag and so on you would never be able to do this or maybe you would but with a lot of tricks in a bar chart it would be very very hard to achieve something like this and that would have all this information and percentages to target the actual values flags or images it would be very very hard if not probably impossible to do something like this with a normal bar chart so we need to get a little bit creative as usual and this is my table that i have i'm going to be using as like the basis for everything that we are going to build in this case i'm going to leave it as a table but i need to format this a lot i'm not going to worry about that now because i just want to basically get everything that i need and then i'm going to format everything in the end so again we have here our percentage target we have total sales image url or the flag for the country and the country itself what we are going to do now is to apply some conditional formatting to this total sales i'm going to go here to cell elements and in total sales i'm going to add data bars so this is going to be our little trick for this table reinvented into a bar chart i'm going to add the data bars and everything looks okay to me but i'm going to change this to show bar only because i don't want to show the value not like this so i just want my bar so now we have only the bars but we are missing our value for the actual total sales like i had in the solution that i just showed you before so what i'm going to do is to get my total sales again but the problem is as you can see it automatically creates another bar kind of yeah it recognizes the conditional formatting and i think even if you change this name probably it won't really work it doesn't as you can see it doesn't really work even if i change the name of the measure it won't really work because it changes both names as you can see because we are using the same measure and this is not what i want so i'm just going to delete that measure and put this back to the original name and i was a bit lazy and i already created a total total sales dummy measure which is basically the exact same one as total sales but to actually get the value for the sales like as a value not about and not a bar i need a different measure so i created a dummy measure for total sales which is again same as sales and i'm going to add this one after this so i have my values here as you can see i mean we have all the elements that we need but now we need to format this in order to get the same kind of design as we had in our solution before let's go to the formatting pane and i'm going to be removing a lot of stuff a lot everything gone in the style i'm going to to put this as none because i don't want any kind of formatting in my chart i want this to look like a bar chart not a table so i'm going to remove the style entirely but it still keeps the grids as you can see i'm going to remove this as you can see it's gone and now we have totals we have headers i don't want any of that so in the headers i'm just going to change the text to white and i'm going to remove the text wrap also i'm going to remove this auto size width because if i keep this enabled every time i select a filter or i do any cross filtering in with the other visuals in my report this will keep changing the column like width and i don't want that because it won't really look very nice don't forget to disable this auto size width now we are going to remove the total so the totals are here and i'm going to remove them okay we still have a line there which probably is somewhere it's here in the border if i'm not wrong yeah i'm just going to it you see that the border position it doesn't have anything selected but if you select one and then remove it it's gone it's a bit weird this behavior but yeah you just have to select any of them and then and select it again and it's gone so we have almost everything we want but still all the bars are like on top of each other and i don't really want that so i'm going to change this i'm going back to the grid and i'm going to change this to show like a slightly thicker like kind of a grid line so actually i disabled the grid lines here but i actually want them now that i realized i need these uh grid lines i just don't want them as uh gray i want them as white so you can't you can't see them as you can see it looks like there is no gridline so it's almost like a bar chart already but yeah we are almost there and now i just have to increase the kind of the grid as you can see it increases everything like the side the space between the bars it looks like it's increased also this image is taking like a lot of space you will see what i mean with when i actually make it smaller so that is an option here color called image height and you can make this smaller so you see the bars looked smaller uh straight away so let me put this even smaller it looks nice now i only have to put this the name of the country is like more to the right so it seems like it's right before the flag so i'm going to this specific column option i'm going to select the country and i'm going to say just put this right aligned to the right and now you can resize the columns so it looks that everything is more like aligned so i'm going to now apply some conditional formatting on the target for that i'm going to sell elements and in the cell elements i'm going to choose the percentage to target and i'm going to change the font color and now i need to change the rules or the formatting style i'm going to say i want this to be a rule and now i want the percentage of target and if this is higher than whatever minimum value you have number not percentage is lower than zero then give me red if it's higher than zero and up to the max then give me green [Music] there is a problem for some reason power bi just changes whatever you selected in the conditional formatting back to percentage which is the most annoying thing ever so let me change everything back to number okay here we are and now we you can see that with the conditional formatting applied you have a few of the numbers that show us red and another some other numbers that show as green so this is my trick for having a table showing as a bar chart and i hope you like this video and as usual just comment below give me some ideas for my next videos and i'll see you i'll see you in the next video i guess [Music]
Info
Channel: Data Pears
Views: 27,364
Rating: undefined out of 5
Keywords:
Id: Fii-IjzC2Xw
Channel Id: undefined
Length: 9min 42sec (582 seconds)
Published: Wed Nov 02 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.