in this video i'm going to go over some tips about how to work with the bar chart in power bi i think
this is one of the more common ones that you'll likely use there are a lot of options in the
visualization and formatting tabs here so we'll go through a couple of them in this video we left
off the last video by using a clustered column chart so that's what we're working with here
a couple things right off the bat one thing you'll notice when you flip through different options
here we can see the access changes by default it automatically determines the numbers that it will
use for the increments here but sometimes you may want to have every single option based on the same
axis number you don't want it to be switching to do that what you can do is go to the
appearance tab and on the y-axis in this case because we're looking at this vertical one
and you can see here there is a start and an end text box here and by default it's set to auto
so why don't we put some values in here we'll say zero and we can set it let's say 10 million
to make sure that everything is included so now by setting that value no matter what we pick here
it will always be based from 0 to 10 million sometimes that's more useful than having it
constantly switching and allows your users to make sure that they're comparing things always to the
same uh the same level another thing you may want to add is the actual markers and labels for what
these values represent to do that you could go to this data labels category and turn that on
and within there you can decide where you want it positioned you could have it automatically decide
where it goes or you could have it always say the inside and depending on the selection here
will actually change the font color so that it's a little easier to read we'll keep this to auto
another thing you could do is maybe you want to have different colors
for different categories and the way to do that would be to add a legend
so why don't we do that if we click on this and go to fields we can see there's no legend here
so by default it's not there but we can add one let's drop color and now
each individual category gets a unique color because it's based on that legend and the legend
gets added by default to the bottom if you want to change that you can turn that offer on here
another cool option here is this analytics tab now analytics gives some built-in default lines
that you can add to your chart let's say you want to see what the median value for
all these things here are all you have to do is click add and it's going to put it there
for you so you can give it a name just shorten this to median this is automatically picking up
the measure that we have in here you'll set this to any color you want dashed solid dotted line
and include a data label so the label will show over here and like anything else you can change
where that value shows up you put it on the right so maybe we want the name and the value median
another one we could do is tool tips so that when you hover over this it gives some values
by default it just shows whatever you have already put on the on the chart so we have the color and
the unit price but let's say we want to add a little bit more up here we're filtering by
category so maybe we want to put category in this tool tip all we would have to do is drag this here
and it shows it and we can always rename it so they make that pretty easy as well
the last thing i'll mention here is sometimes you'll want to make the width of these
columns a little bit wider and the way to do this is actually to go into the x-axis and
change these settings here the category with size and padding but if we do it right now very little
is actually going to change and that's because what's happening is it's technically creating
a bar for every category in each section here but there's only actually values for one of them
behind the scenes what's happening here is there's a value of zero for every other one so here the
black is showing but then red silver yellow blue and these has zero so you don't see those colors
so let's let's take the the legend off of this so we can see what this what this looks like
now if we go back to x-axis change this padding we can see we can adjust how big or small the
the bars look by changing the padding which is really changing uh what's between these make it
smaller there's less room in between each one more there's more space in between let's say we wanted
those colors and we wanted it bigger how would we do that and to make that possible if that's what
you wanted you actually need to change the type of chart as we mentioned it's really stacking each of
them next to each other so to make it look right we want to change this to a stacked column chart
so what it would do is it will just stack them on top instead of next to each other let's add
the legend back here and we can see we're getting the output that we want because it's really it's
stacking these and all the zero ones you don't see them so the result is what looks like this
in this case the only option is constant line instead of
those other more analytical type lines but let's add this here let's say you know we want to target
set the value let's say somewhere in the middle we'll say 5 million
make it black have a data label
and just do the same thing name and value on the right so now we can see not only vertically the
values but we can see easily how it compares to the target and because we made it so that the
y-axis never changes this stays more in line as well and it keeps everything a little bit
easier to read and more consistent i'm actually last thing i'm going to do is actually hide this
legend now in this case it probably is unnecessary to give these different
colors i think it would actually be easier to interpret by keeping them all the same
because we're comparing the same values but for the sake of example we'll leave them here
that's all i wanted to show you for this video hopefully you found this helpful if you did please
feel free to like leave a comment if you have any questions and i'll see you at the next video