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 a really good one
if you're building dashboards
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 array 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 it
at 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
by just setting in a particular,
a 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 zeroes.
There we go.
And now you can see
how 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 there,
just over the halfway mark.
So that's one thing,
that's gauges.
The other thing we can do
is use a card visualization
which actually just shows us
the numeric representation
as 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 to see,
you know, ignore that,
just give me the exact value
5.199 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
I want to put into this card.
So let's create a new one...
And I'll call this measure
our Progress.
I'll start off
by putting in some text there,
so "Progress
on unit sales this year."
And I'll just need
to concatenate this
with the measure
that I'm interested in.
I'm actually going to use
our units column,
so I want to sum that one up.
So 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.
That way we see everything.
And I still get updated
and sliced and diced
along with everything else
in visualization...
In our report rather.
And you can use this
in some really clever ways.
And if you wanted to get
a bit more involved
in writing some more
complex tax...
You might have ones with
if statements in there that say,
"If I've only got
a single year selected
then it's just
this year's sales,
if I've got
all the years selected,"
then maybe the text says
something different
like
"total sales over all years."
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 could 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 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 can also drop a target
in here,
and the great thing
about using this target
is it will 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,
so high sales
or higher unit sales is better
but if you had maybe...
You know,
some cost of goods sold metric,
usually lower
is better for that.
And you can also control things
like the way
that the number itself
is displayed,
the 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.