Hi Everyone,
I need to create a chart that shows current month and YTD in dimension, and the corresponding measure value for them.
PFB the data.
Month | MonthNum | Amount |
Jan-19 | 1 | 725 |
Feb-19 | 2 | 549 |
Mar-19 | 3 | 595 |
Apr-19 | 4 | 759 |
May-19 | 5 | 579 |
Jun-19 | 6 | 595 |
Jul-19 | 7 | |
Aug-19 | 8 | |
Sep-19 | 9 | |
Oct-19 | 10 | |
Nov-19 | 11 | |
Dec-19 | 12 | |
I am able to create the above as two separate charts(Dimesnion & Expression mentioned below).
//Script level variable:
Let vCurrMonth = Num(Month(today())-1);
1st chart:
Dimension:
Month
Expression:
Sum({<MonthNum= {'$(vCurrMonth)'}>}[Amount])
2nd Chart:
Dimension:
Year(Month)
Expression:
Sum({<MonthNum= {"<=$(vCurrMonth)"}>}[Amount])
Please suggest how can I show it in a single chart as shown in attached screenshot.
Thanks,
Reema