0% found this document useful (0 votes)
28 views4 pages

Powerbi Intro 9

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views4 pages

Powerbi Intro 9

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

CHAPTER 3.

PLOTTING

Challenge 4: Create a Word Cloud for countries by GDP


per capita
a) Create a plot that compares GDP per capita for each country
• Category: name
• Values: GDP per capita

Challenge 4: Solution

3.4.1 Map chart


We need Latitude lat and Longitude long values to create a Map chart. For
this, we use the following parameters:
Longtitude: long
Latitude: lat
Size: Population
Legend: oecd

32
CHAPTER 3. PLOTTING

This plot tells us if a country was an OECD member by the color of the bubbles.
These categories can be seen in the legend at the top of the chart. It also
indicates the population size of each country by the size of bubble.
You can also use the country field alongside or replacing the longtitude and
latitude values. Power BI recognises the names of countries however make sure
they are spelt correctly or use with longtitude and latitude values to ensure
accuracy.

3.4.2 Measures and quick measures


At the beginning of the workshop, when we imported the data, we created a
calculated column for total GDP using the columns for GDP per capita and
population. This is great when we know what columns we will need and if we
want to set up our data in a certain way through Power BI when you load the
data. However this is not always the case and you will discover you will need
certain calculations and measures as you are working with the data. We can do
this through the measures function of Power BI.
Select Quick Measure on the Home tab. This will give you a variety of
different calculations you can use to create measures that can be used in your
visualisations. Let’s say you want to find the max average life expectency. Select
“Max per category”, add life expectency to the base value and add country
to the category. You will see a new field appear in your Fields pane. You
will also see a small calculator icon next to the name which indicates this is a
measure. Now lets see what this calculates. Create a Matrix visual. This visual
is a tabular visual which we can use to show and examine values. Add the new
field the Matrix. A number should now show up that should be the max average
life expectency for a country in the data. We can break this down by adding
region to the rows to see the max values depending on region. We can then
add country below region to give a hierachy that shows the max values for each
function.
Let’s look a bit more at the measure you just created. Click on the field and at
the top of the visual, an equation box with an equation should appear. This is
the calculation that Power BI is doing based on what you set up in the quick
measures prompt. This formula is using the DAX formula language. This is
similar to Excel formulas and there are some overlaps so if you are familiar
with Excel you will be familiar with a few of the DAX functions. You can edit
and formula in your quick measure or write one from scratch using the New
Measure option on the Home tab. DAX will not be covered in this workshop
however you can find the DAX reference guide on the Microsoft Power BI website.
One thing you may notice is that calculating the average for a long period of
time, especially when there has been inconsistent data collection like the life
expectency values, might not be meaningful or useful for users looking at your
visuals. This is where being able to filter and slice your data is important.

33
CHAPTER 3. PLOTTING

3.5 Filters
Now that we have a set of visuals showing different information, we come to the
most important part of data visualisation which is communicating and telling
the story of the data. Right now these visualisations, while interesting and
potentially useful after some close examination, are difficult to comprehend to
the average person or if used in a quick presentation. This is where we will be
examining filters.
Filters are a powerful way to break down and show specific parts of the data.
You can access the Filters panel through clicking Filters.

You can filter data for individual visualizations, pages and for the entire report.
Let’s have a look at page 2 of our report. This page is rather confusing, we
have lots of points on the map for most countries in the world and we have
calculations looking at average GDP and life expectancy for 200 years. This is a
lot of different information that has been calculated over a diverse timeline.
Select the scatter plot you created for challenge 3. Click on the Filter panel
which is adjacent to the Visualization panel. Drag the year field and place it
in Filters on this visual bar.

34
CHAPTER 3. PLOTTING

Change the filter type to Basic Filtering Now you have all the years as a
scrolling list. Select any one year and you can see the data for that particular
year. For example, if we want to look at this data from year 2010, select 2010 in
the filter panel.

Challenge 5: Filtering
A. On the previous plot, create a filter for region.
B. Visualize gdp_percapita vs life expectancy for: Americas

35

You might also like