Qlik Community

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Support Case Portal has moved to Qlik Community! Read the FAQs to start exploring Support resources.
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 (4)
0 Replies