Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Friends,
Hope all doing well.
Please help me solve this problem statement. I need to compare Previous Year all moths vs Current Year months amount. As per below screenshot.
Month | Current Year 2022 | Previous year 2021 |
Jan | 123 | 234 |
Feb | 3435 | 3532 |
Mar | 354 | 456 |
Apr | 234 | 765 |
May | 345 |
Below is the dataset.
Year | Month | Amount |
2020 | Jan | 346 |
2020 | Feb | 221 |
2020 | Mar | 317 |
2020 | Apr | 387 |
2020 | May | 269 |
2020 | Jun | 228 |
2020 | Jul | 340 |
2020 | Aug | 297 |
2020 | Sep | 249 |
2020 | Oct | 244 |
2020 | Nov | 213 |
2020 | Dec | 391 |
2021 | Jan | 440 |
2021 | Feb | 253 |
2021 | Mar | 248 |
2021 | Apr | 438 |
2021 | May | 326 |
2021 | Jun | 397 |
2021 | Jul | 470 |
2021 | Aug | 276 |
2021 | Sep | 231 |
2021 | Oct | 295 |
2021 | Nov | 224 |
2021 | Dec | 296 |
2022 | Jan | 431 |
2022 | Feb | 311 |
2022 | Mar | 296 |
2022 | Apr | 284 |
2022 | May | 429 |
Below is the dataset.
Thanks
Mtk
Dimension
=Month
MEasure
CurrentYear = sum({<Year={"=Max(Year)"}>}Amount)
PreviousYEar = sum({<Year={"=Max(Year,2)"}>}Amount)
Dimension
=Month
MEasure
CurrentYear = sum({<Year={"=Max(Year)"}>}Amount)
PreviousYEar = sum({<Year={"=Max(Year,2)"}>}Amount)