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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
KristianHamlin
Frequent Visitor

How do i add 2 Line values within a Column and Line chart?

I have a simple bar chart where i have 2 years that i am comparing next to each other

 

ie January to December and then bar column for for each month for 2018 and one for 2019 lets say this is showing sales for each month, this is fine

 

I have then added a secondary axis on the right of the graph to show job count for each month, however this is where i have the problem as i want one line showing job count for 2018 an one for 2019.  However i cannot seem to get seperate lines for each year,  ie the total of the line is showing an addition for January of both Jan 18 & 19 added together as opposed to haveing a line for each.bar & line.PNG

 

Anyone that can help me out understand what i need to do would be very much appreciated for some guidence

 

 

 

 

1 ACCEPTED SOLUTION

Yes. One for current year:

Job Volume = COUNT( [Fact] )
Job Volume LY = CALCULATE(
                                              [Job Volume],
                                             SAMEPERIODLASTYEAR( [Date] )
                             )

Regards,

 

Fernando

 

View solution in original post

3 REPLIES 3
calerof
Impactful Individual
Impactful Individual

Hi @KristianHamlin,

 

Did you try to add in Line values two measures / values?

 

Hope it helps,

 

Fernando

 

Are you suggesting that i need to add a measure into my job volume data, one measure for job count for 2018 and then a second measure for job count 2019?

 

I am fairly new to using power bi so learning all the time, havent really had the need for dax measures prior so a little out of my depth at the moment if this is the only solution to be able to get 2 lines for my job counts based on the 2 calander years.

Yes. One for current year:

Job Volume = COUNT( [Fact] )
Job Volume LY = CALCULATE(
                                              [Job Volume],
                                             SAMEPERIODLASTYEAR( [Date] )
                             )

Regards,

 

Fernando

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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