Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
master_student
Creator III
Creator III

variation until today

Hello Guys,

In the graph bellow, I am comaring the recharge amount 2016 Vs 2017 and I am calculating the variation 2017 par rapport 2016

value 2017 - value 2016  / value 2016 *100 , the problem is whene the selected month is  october , the variation is false because the rest of value of october 2017 are not yet available. so i need to display the variation to be until today whene the month is october, any idea ?

Capture.PNG

the variation expression :

=num((num(sum( {$<[Year of date]={$(=Max([Year of date]))}>} recharge_amount),'# ##0')- num(sum( {$<[Year of date]={$(=Max([Year of date])-1)}>} recharge_amount),'# ##0')) / num(sum( {$<[Year of date]={$(=Max([Year of date])-1)}>} recharge_amount),'# ##0') *100,'# ## ')

Thank you so much

Labels (1)
3 Replies
Anil_Babu_Samineni

This?

If(GetFieldSelections(MonthField) = 'October',

num((num(sum( {$<[Year of date]={'$(=Today())'}>} recharge_amount),'# ##0')- num(sum( {$<[Year of date]={'$(=AddYears(Today(),-1))'}>} recharge_amount),'# ##0')) / num(sum( {$<[Year of date]={'$(=AddYears(Today(),-1))'}>} recharge_amount),'# ##0') *100,'# ## '),

num((num(sum( {$<[Year of date]={$(=Max([Year of date]))}>} recharge_amount),'# ##0')- num(sum( {$<[Year of date]={$(=Max([Year of date])-1)}>} recharge_amount),'# ##0')) / num(sum( {$<[Year of date]={$(=Max([Year of date])-1)}>} recharge_amount),'# ##0') *100,'# ## '))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar

You can use set analysis to restrict your chart to show up until today...what is your date field called here? and what is it's format?

master_student
Creator III
Creator III
Author

sunny

my date dimension is : Date(SetDateYear([Calendar date], Year(Today())), 'DD/MM')