Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
reema_dangwal
Contributor
Contributor

MTD and YTD bar in a single bar chart

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.

MonthMonthNumAmount
Jan-191725
Feb-192549
Mar-193595
Apr-194759
May-195579
Jun-196595
Jul-197 
Aug-198 
Sep-199 
Oct-1910 
Nov-1911 
Dec-1912 
   

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

 

Labels (3)
0 Replies