Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
I have a data table as shown below.
I wish to create a multiple-line chart where I want to display codes A & B Sales on the primary axis and code C Sales on the secondary axis.
date | code | Sales |
01-Jan | A | 50 |
01-Jan | B | 55 |
01-Jan | C | 60 |
15-Jan | A | 40 |
15-Jan | B | 75 |
15-Jan | C | 70 |
30-Jan | A | 40 |
30-Jan | B | 50 |
30-Jan | C | 60 |
01-Feb | A | 70 |
01-Feb | B | 60 |
01-Feb | C | 50 |
15-Feb | A | 45 |
15-Feb | B | 35 |
15-Feb | C | 20 |
28-Feb | A | 25 |
28-Feb | B | 50 |
28-Feb | C | 30 |
I am able to create the same in MS excel but seems facing issues in power BI.
Hey @prashantg364
You can simply create two columns
1. For code - A&B
2. Foe code - C
and now you can simply create the multiple-line chart where you can display codes A & B Sales on the primary axis and code C Sales on the secondary axis.
To create the column use the following: https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-tutorial-create-calculated-column...
I hope my answer was helpful to you!
Hi @prashantg364
What issue you are facing in power bi ?? you didnt mentioned that.
share screenshot what is you query?
for Y axis you can take value from other column it seems you all A B C values are coming under 1 column so that why power bi takes all you A B C values on Y axis not on secondary Y axis.
You can create a measure like this for Secondary Y axis
Column c= CALCULATE ( Sum( Sales), [Code]= "C")
It will create a seperate measure for your C code. take your measure into secondary Y axis.
For Y axis create another measure with consist of 2 code A &B
Column A&B= CALCULATE ( Sum( Sales), AND([Code]= "A",[Code]= "B")
Take column A&B in Y axis
Take column C in secondary Y axis.
I hope I answered your question!
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
87 | |
76 | |
74 | |
55 | |
45 |
User | Count |
---|---|
117 | |
106 | |
77 | |
66 | |
65 |