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.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
108 | |
98 | |
81 | |
65 | |
62 |
User | Count |
---|---|
147 | |
116 | |
104 | |
88 | |
65 |