JustReflektor
JustReflektor

Reputation: 95

Add more than one field to axis of chart (e.g. Scatter Graph)

So I want to create a graph like in the attached image. The Y-axis contains the months of the year. The X-Axis will contain a number of programs. The data points in the graph will increase depending on how many apps there are in that month of the year for that particular program.

I want to add each of the month fields to the y axis, but it will only let me insert one field. Is it possible to make a graph like this in power BI?enter image description here

Screenshot of sample data used in a the main query: enter image description here

I have pivoted the PROGRAM NAME columns in the main query, to make a query that looks like this. This is the query I would work off for the chart:enter image description here

Upvotes: 1

Views: 1986

Answers (1)

user8065556
user8065556

Reputation:

Do you mean like this?

Scatter Plot of Months by No. of Apps

Assuming that each of the rows 2-18 are actual data entries and not just transposed column headings, you could have a data set that looks like the following.

Data set for scatter plot

How to re-create this:

  1. In your Report Tab, create a new column in your data set called "Months" like this: Month Number
  2. Scatter plots require numerical values on each axis, so in order to get the number of apps into the plot, you cannot simply drop the "Application Name" field into the plot and then use the SUM summary. You will need to create a separate column like this: No. of Applications
  3. Drop the Months field into the x-axis, and the No. of Apps field into the y-axis, as shown in the first image. For the size, use No. of Apps again. You could then choose to leave the legend blank to get the result below, or use the Country or App Name to get the first image in this answer. Scatter plot without legend.

Some tips:

  • You got the x-axis and y-axis terms mixed up. The x-axis is the horizontal axis and the y-axis is the vertical axis.
  • In order for the scatter plot to work, you must have a quantitative (or numerical) fields for both the x- and y- axes. This is because the purpose of a scatter plot is to show relationships between two variables -- or more plainly, how two fields affect each other.
  • Since the month should not affect the number of applications, it would be better to use a dot plot, which shows the number of applications for each month.

Dot Plot of No. of Applications by Month

Let me know if this helps!

Upvotes: 1

Related Questions