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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
prasad333
Contributor III
Contributor III

Define the expression

Hi,

I was going through a dashboard where I found a slider object showing comparison value for previous year and current year but as an entrant I couldn't understand the set expression. Can anyone please define this

=year(AddYears(maxOrderDate,-1)) & ' vs. ' & year(maxOrderDate)  & ' ' & Only({<No={59}>} [$(=vDataLanguage)]) & ' = ' & num(( sum( {<Year={$(=Max(Year))}>} SalesAmount) - sum({<Year={$(=Max(Year)-1)}>} SalesAmount))/sum( {<Year={$(=Max(Year)-1)}>} SalesAmount), '#.#%')

Regards,

KHARANSU

2 Replies
maxgro
MVP
MVP

=

year(AddYears(maxOrderDate,-1)) & ' vs. ' & year(maxOrderDate) 

     if maxOrderDate is 2017

     2016 vs 2017

&

' ' & Only({<No={59}>} [$(=vDataLanguage)])

     don't know, it depends on field No and variable vDataLanguage

&

' = ' & num(( sum( {<Year={$(=Max(Year))}>} SalesAmount) - sum({<Year={$(=Max(Year)-1)}>} SalesAmount))

/

sum( {<Year={$(=Max(Year)-1)}>} SalesAmount), '#.#%')

     if max year is 2017  (sales amount 2017 - sales amount 2016) / sales amount 2016

     % change in sales amount

prasad333
Contributor III
Contributor III
Author

Thank You Massimo. Thanks for the detailed explanation and yes there are different languages, so they have used variable.