cancel
Showing results for 
Search instead for 
Did you mean: 
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
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

Thank you 2022 Review

2022 Monthly Feature Releases

We had a great 2022 with a ton of feature releases to help you drive a data culture.