Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get 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

Reply
prashantg364
Helper II
Helper II

line charts

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.

datecodeSales
01-JanA50
01-JanB55
01-JanC60
15-JanA40
15-JanB75
15-JanC70
30-JanA40
30-JanB50
30-JanC60
01-FebA70
01-FebB60
01-FebC50
15-FebA45
15-FebB35
15-FebC20
28-FebA25
28-FebB50
28-FebC30

 

I am able to create the same in MS excel but seems facing issues in power BI.

prashantg364_0-1714453605477.png

 

2 REPLIES 2
Shivu-2000
Resolver III
Resolver III

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!

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!





Uzi2019
Super User
Super User

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!

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.