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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to use current selection function for comparison of sales on basis of various seasons

Hi

i want to compare sales ie current year and previous year sales on basis of selection of season code from same  list boxes

so for current season i have declared variable as

vSales_summary_current_season=GetCurrentfeild([Season Code])

vSlaes_Summary_Current_Season=GetCurrentFeild(season code)-1)

expression for previous year season

Num( sum({$<Sold_year ={"$(=max(Sold_year)-1)"},season={$(vSales_Summary_Previous_Season)-1}>} [inv value]/Sales_INR_Unit ), '#,##0.0')

the above expression is giving an error

expression for current year

Num( sum({$<Sold_year ={"$(=max(Sold_year)-1)"},season={$(vSales_Summary_current_Season)}>} [inv value]/Sales_INR_Unit ), '#,##0.0')

finalsales.png

10 Replies
Anil_Babu_Samineni

Just think algorithm of set analysis how and what it has? Then only we came to know. Anyway, To answer may be

Num( sum({$<Sold_year ={"$(=max(Sold_year))"},season={"$(=GetFieldSelections(GetCurrentField([Season Code])))"}>} [inv value]/Sales_INR_Unit ), '#,##0.0')

OR

Num(sum({$<Sold_year ={"$(=max(Sold_year))"},season={$(=Concat(Chr(39) & GetFieldSelections(GetCurrentField([Season Code])) & Chr(39), ',')}>} [inv value]/Sales_INR_Unit ), '#,##0.0')

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