Lab-3-9
0 (0 Likes / 0 Dislikes)
>> The visualizations
we've looked at so far
have typically been used
to compare values
across different categories
or to compare
two different values.
But if you're building reports
in Power BI,
sometimes you want them
to just show a single KPI
or a single metric
just so that you can track
that as it changes over time.
We have a few different visuals
that help do that.
Gauges are really good one
if you're building
bashboards
and want to show progress
towards a particular target.
Let's look at our total revenue.
And you can see that our gauge
shows the overall number,
in this case 5.2 billion
and then progress
towards a certain amount.
By default this end amount
is just double
whatever the value was.
So you'll always see about
halfway point.
You can add other fields
on the right hand side
here to determine
the minimum, maximum,
or the target either bound
to particular data values.
Or you can use
the formatting options
to go and customize
these budget setting
in a particular specific value.
So if I wanted our maximum
to be 10 billion,
keep going till I hit 10 billion.
I could also choose
what my target is.
So I want to have
my target at seven billion.
Make sure I get enough zeros.
Here we go.
And now you can see
our gauge
has got a little target line
that shows us
this is what our target is,
seven billion and we know
that we're tracking
towards potentially
a total of 10 billion.
Just over,
just of the halfway mark.
So that's one thing,
that's gauges.
The other thing that we can do
is use a card visualization
which actually just shows us
the numeric representation
as some text.
By default we'll use
display units to try
and trim down the number
rather than having
something with lots
and lots of digits in it.
But I can also use
the formatting options
to go and override this.
So rather than choosing this
automatic display units
I can say, actually,
I want to see it in thousands
or even I want say, you know,
ignore that,
just give me
the exact value 5.19 billion.
I can change the precision
if I want to add
more or less decimal places.
And I've got
a few different options about
turning the label on and off,
or even doing word-wrap
if I've got a particularly
long value here.
And on that subject,
there are some clever things
that you can do
with these cards.
I can actually create
a measure in my model
that returns a string,
returns some text
that I want to
put into this card.
So let's create a new one.
And I'll call this measure,
how about Progress?
And I'll start off by
putting some text to it.
So progress
on unit sales this year.
And I'll just need
to concatenate
this with the measure
that I'm interested in.
I am actually going to use
our units column.
So I want to
sum that one up.
So the total sum
over our units column.
And I can see
here's my progress.
Okay, so let's drag this
on to our canvas.
And I want to visualize
this one as a card as well.
So now I get some text
saying what the progress
on our unit sales is.
Drag this one out.
Oh, it was here I think.
And this will get updated
and sliced and diced
along with everything else
in our visualization,
in our report rather.
And you can use this
in some really clever ways.
I mean, if you want to get in,
bit more involve in writing
some more complex tax,
you might have ones
with If statements
in there that say, you know,
if I've only got
a single year selected,
then it's just
this year's sales,
if I've got all years selected,
then maybe the text says
something different like,
total sales
over all years.
And you can do
some really clever things
by using this.
Have a look online,
there's lots of examples
of how people have
used this already as well.
All of the single number visuals
tend to lend themselves
to showing KPIs
where you've got
a particular value
and a target
you're working towards.
We actually have
a KPI visual as well
that can be really useful
for showing this
sort of information.
The great thing about
this KPI visual is it shows you
an indicator,
an actual number
but also a trend
over the last few time periods
of how that,
that number has changed.
So let's take a look at
our units amount
over the last few years.
And you can see
in the background
we get this nice trend line.
So we had a big peak
a few years ago,
things have dropped off
in the last couple of years.
I could also drop
a target in here.
And the great thing about
using this target
is it'll actually color the KPI
based on your progress
towards it.
So if you haven't
hit your goal yet, it's red.
If you've gone over the goal,
it's green.
And you can control
those goals,
whether the goals are shown,
you can control things like
whether the Trend Axis
is turned on or off.
You can change
whether higher is
better or lower is better.
So typically for
sales and units, you know,
higher sales
or higher unit sales is better.
But if you had maybe a,
you know,
some cost of goods sold metric,
obviously
lower is better for that.
And you can also
control things like the way
that the number itself
is displayed,
to size of the text,
that sort of stuff.
There's plenty
different formatting options
in here as well.
So all of those
different types of visuals,
the gauges, the cards,
and these KPIs
are really useful
for showing single values
and your progress
towards them
versus some sort of target
for a particular time period.