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 have the following table and i am trying to show in a clustered column chart the YTD total items by month, for year over year. Is it possible?
I managed to show the current YTD with the previous YTD only using the following formula in a measure. But i am not able to show for the YTD for years prior to last year on the same chart.
Same Period Last Year =
CALCULATE(
sum(Table1[Items]),
SAMEPERIODLASTYEAR('Date'[Date])
)
In this case, for each month-year on the X-axis of the clustered column chart, it should have 3 columns (YTD for 2020, 2021 and 2022). Any help is much appreciated!
Date | Items |
27/01/2020 | 3 |
28/02/2020 | 6 |
29/03/2020 | 9 |
01/04/2020 | 12 |
02/06/2020 | 8 |
05/10/2020 | 2 |
06/12/2020 | 3 |
03/01/2021 | 3 |
05/01/2021 | 7 |
03/02/2021 | 6 |
04/03/2021 | 2 |
04/04/2021 | 9 |
04/05/2021 | 5 |
04/05/2021 | 2 |
05/06/2021 | 4 |
01/07/2021 | 7 |
04/08/2021 | 8 |
04/09/2021 | 8 |
06/10/2021 | 4 |
15/10/2021 | 6 |
09/11/2021 | 3 |
11/12/2021 | 2 |
13/12/2021 | 10 |
05/01/2022 | 4 |
06/01/2022 | 12 |
27/02/2022 | 3 |
28/02/2022 | 3 |
01/03/2022 | 11 |
02/03/2022 | 7 |
04/04/2022 | 8 |
04/04/2022 | 5 |
09/04/2022 | 3 |
06/05/2022 | 3 |
09/05/2022 | 3 |
05/06/2022 | 2 |
11/06/2022 | 5 |
06/07/2022 | 9 |
13/08/2022 | 1 |
15/08/2022 | 6 |
Solved! Go to Solution.
Hi,
You may download my PBI file from here.
Hope this helps.
Hi,
You may download my PBI file from here.
Hope this helps.
Hi @Ashish_Mathur, thanks for your reply! But i think there is a problem with the measures. As below, the values for January is correct but the other months are not correct. For example, in February, all 3 years (3 columns) should each have value = 6. For March, the values should be 9 (2020), 2 (2021) and 18 (2022). The Items column is a good reference to the correct total for each month in each year. Any idea on how to fix it?
You are welcome. That result seems correct to me. In January and February 2021, the items were 10 and 6. There in YTD Feb 2021, the figure should be 16. What is the mistake?
@Ashish_Mathur I'm sorry if i didn't make it clear earlier, but i am looking for a graph where the data is shown by month on the X-axis and there should be 3 bars for each month, which groups only the data for that month and the corresponding year for 2020, 2021 and 2022. I think your solution is a running total by month for each year.
For example (month: 2020, 2021, 2022):
January: 3, 10, 16
February: 6, 6, 6
March: 9, 2, 18
April: 12, 9, 16
...
December: 3, 12, 0
Is that possible?
Hi,
You may download my PBI file from here.
Hope this helps.
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 |
---|---|
96 | |
93 | |
82 | |
70 | |
64 |
User | Count |
---|---|
118 | |
106 | |
93 | |
79 | |
72 |