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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Anonymous
Not applicable

Combine 2 total value in Line Chart

Hello,


I'm newbie in Power BI. I'm learning Power BI within 1 week and starting to practice more with some charts.

Now, I have the problem with the line chart.

 

I have the database which present the number of people leave the company in 2018 & 2019.

The idea is build the line chart as information below:

- the x-asis present 12 months

- the y-axis present the total of people leave the company in each month

- the line present the value of 2018 & 2019.

 

The problem is I don't know in Power BI how I can present 2 line (one of 2018, one of 2019) in the same chart.

I can do only for the 2018 or 2019 or the total of 2 years.

 

If I do it on excel, I have to create the table, calculate the total value of each month of each year. Then, I can draw it.

Do I need to calculate at the same way in Power BI?

 

image.pngimage.pngimage.png

 

2 REPLIES 2
TeigeGao
Solution Sage
Solution Sage

Hi @Anonymous ,

We can create two measures to represent year 2018 and 2019 like below:

Measure2018 = CALCULATE(COUNTROWS(Data),YEAR(Data[Date])= 2018)
Measure2019 = CALCULATE(COUNTROWS(Data),YEAR(Data[Date])= 2019)

Then drag these two measure to value, the result will like below:

Snipaste_2019-04-03_15-38-28.png

Best Regards,

Teige

Anonymous
Not applicable

Thank you a lot.

I will try 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.