THE SQL Server Blog Spot on the Web

Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | |
in Search

John Paul Cook

BI Beginner: Simple X-Y Plot

When I worked for Microsoft giving presentations on data platform products, it was a common occurrence to have people tell me that they didn’t know how to use Power BI. This is the first in a series of posts showing how to do simple, useful tasks in Power BI Desktop. Power BI Desktop is free. Download the Power BI Desktop from here.

You can either create a simple Excel file such as the one shown below or download the attached file to follow this tutorial. This tutorial begins with the steps to create a simple X-Y plot in Excel. Later the Excel file is used as input to Power BI.

image

Figure 1. Sales data for simple X-Y plot.

It’s easy to create an X-Y plot in Excel as shown below.

image

Figure 2. Sample data saved in Excel to be loaded into Power BI.

image

Figure 3. Steps to create a simple X-Y plot in Excel.

image

Figure 4. Simple X-Y plot created by Excel.

What follows is my answer to the question of how to do the same thing in Power BI. As you will see, it’s actually pretty easy. It will take you longer to read these instructions than it will take to actually do the work.

Begin by loading your Excel file into Power BI Desktop.

image

Figure 5. Loading data into Power BI Desktop.

You’ll be prompted to select your worksheet.

image

Figure 6. Select your worksheet and click Load.

After your data is loaded, Power BI appears in Report View. It’s not like Excel where you’d immediately see your data values in a grid. You can see your data in a grid by clicking on Data, but that’s not what we need to do now.

image

Figure 7. Report View in Power BI Desktop.

Move your mouse under Visualizations and click on the Line chart icon. This is the part where people tell me they have trouble. What to do next, what goes where?

The Axis is the X-axis. So where to the Y-axis value belong? Under Values – where else, now that you think about it!

image

Figure 8. Line chart parameters.

image

Figure 9. Drag the Year to the spot just under Axis.

image

Figure 10. Drag Units Sold to the spot just under Values.

 

image

Figure 11. Finished line chart.

image

Figure 12. Line chart resized.

It’s really easy to change the visualization type. You should experiment by clicking on various visualization to see what they look like.

image

Figure 13. Click on Stacked column chart to change how it looks.

You probably want to do some formatting. Click the icon for the paint roller brush to explore the formatting options. Your formatting changes remain intact even if you change your visualization.

image

Figure 14. Click on the Format icon to expose the formatting properties.

image

Figure 15. Use the Title properties to change the title.

image

Figure 16. Extensive formatting just to show what is possible.

image

Figure 17. Notice that the formatting changes carry across different visualizations.

Save your Power BI model when you’re done!

The next post in this series is here where you can learn how to make stacked charts.

Published Wednesday, May 17, 2017 5:54 PM by John Paul Cook

Attachment(s): PowerBI20171705.zip

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Leave a Comment

(required) 
(required) 
Submit

About John Paul Cook

John Paul Cook is a database and Azure specialist who works in Houston. He previously worked as a Data Platform Solution Architect in Microsoft's Houston office. Prior to joining Microsoft, he was a SQL Server MVP. He is experienced in SQL Server and Oracle database application design, development, and implementation. He has spoken at many conferences including Microsoft TechEd and the SQL PASS Summit. He has worked in oil and gas, financial, manufacturing, and healthcare industries. John is also a Registered Nurse who graduated from Vanderbilt University with a Master of Science in Nursing Informatics and is an active member of the Sigma Theta Tau nursing honor society. He volunteers as a nurse at a clinic that treats low income and uninsured patients. Contributing author to SQL Server MVP Deep Dives and SQL Server MVP Deep Dives Volume 2. Opinions expressed in John's blog are strictly his own and do not represent Microsoft in any way.

This Blog

Syndication

Privacy Statement