Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
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?
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:
Best Regards,
Teige
Thank you a lot.
I will try
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 56 | |
| 40 | |
| 38 | |
| 21 | |
| 21 |
| User | Count |
|---|---|
| 141 | |
| 105 | |
| 63 | |
| 36 | |
| 35 |