Showing posts with label Clustered Column Chart. Show all posts
Showing posts with label Clustered Column Chart. Show all posts

Friday, September 8, 2017

Getting data from the Web in PowerBI - Loading Error Fix

In my previous post,there were no errors in visualization but one of the data points, namely for the year 2011 did not get loaded correctly. The reason was a reference to the (shown in a link) data that got embedded in the last column of the data as shown here:




In order to get the last column correctly I had to make a slight change using the transformation:
= Table.TransformColumnTypes(#"Renamed Columns",{{"2011", type number}})

Here are mode details of query:


Here is the query after changes.



Here is the data visualization settings window.





Here is the final result with data for Hinduism included.



Getting data from the Web in PowerBI

The latest update of PowerBI has access to data from very many sources shown here:


In this post getting data from the web will be described.

Getting data from the web is quite easy if the web page has tables of data and is accessible without providing authentication such as many of the public web pages like Wikipedia.

Get Data | Other brings up the list of the data sources the first of which is Web.


Click Connect at the bottom of the Get Data page. This brings up the window where you type-in the url of your source, in this case that of the Wikipedia link.


Click OK.

The Navigator gets displayed with all the different tables of information on the page as shown.



I choose the Population composition trend by religion between the years 1951 to 2011 for every 10 years.

The data that will be loaded into PowerBi is shown here.


I then click the load button at the bottom of the navigator.

In order to show the minority religions in India, I remove Hinduism although it has been on the decline in the duration considered (5.11% decrease from 1951 to 2011).

The unwanted rows can be removed using the following menu option.

I remove Hinduism from this data set.


You can remove 1 or more rows from the data set. I have also removed the data for 2011 as there appears to be an import problem of the data.

This image shows the visualization settings.


Now the final data for creating a clustered chart is as shown.

You surely agree, a chart tells a much better story than a bunch of data.

I will troubleshoot the data for 2011 which presented some problems in another post.

Tuesday, November 22, 2016

Creating a report using JSON formatted data with Power BI - Part 2


This is a continuation of my previous post.

Once the query is properly created turning it into a report in Power BI is quite easy. It takes only a couple of clicks. Here is the last query in the previous post.

The column data types are text and you need to change them. Clicking each column you can change the data type. The title_id is kept as is text. The qty was changed to whole number as well as the ytd_sales column. The Amount column was changed to decimal. Here are the allowed data types in PowerBI.

Now that the plot data is ready you can click the first menu item, Close & Apply in the Query editor.

Now you place Id in the Axis and the other three (Qty, Ytd_Sales, Amount) in the value fields to display a Clustered Column Chart as shown.
or a Multi-row card report as shown.


You can also choose any other chart type.

When Identity Security Becomes a Wall — Not a Shield

After a breach that forced a reset of my digital identity, I hit a roadblock I never anticipated: multi-factor authentication (2FA) locked m...