Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have one Bar chart in QlikSense. Dimension is dates:(01/Mar/2018) format & Measure is Sum(Sales).
as well as i have YTD,QTD & MTD Filters.
-> If i select like 01.apr/2019 now the bar is showing april2019 sales. My requirement is if i select MTD 01/Apr/2019 then the bar should displar apr/2019 sales and mar/2019 sales in single bar.
-> if i select QTD 01/Apr/2019 then the bar should displar apr/2019 sales and apr/2018 sales in single bar.
-> if i select YTD 01/Apr/2019 then the bar should displar From jan/2019 to apr/2019 sales and 2018 sales in single bar.
Do you know how could I obtain this logic?
Thanks in advance to all of you!
Regards,
kumar
I am just putting down the algorithm for you:
1. Write first expression with if condition like
if(vButton='MTD', set expression of current MTD,
if(vButton='QTD', set expression of current QTD sales, set expression of current YTD sales)
2. Write expression 2 with if condition like:
if(vButton='MTD', set expression of previous MTD,
if(vButton='QTD', set expression of previous QTD sales, set expression of previous YTD sales)
vButton is the variable here and simple set analysis expression for YTD will be like:
sum({<Year={"$(=max(Year))"}>}Sales).