Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

LFL sales comparison expression

Hi

i want to implement a LFL sales comparison  so for that i have expresiions for current year and previous year as following

current year

sum({< Sold_Year = {"$(=Max(Sold_Year))"}>} [inv value]/Sales_INR_Unit)


Previous Year

sum({< Sold_Year = {"$(=Max(Sold_Year)-1)"}>} [inv value]/Sales_INR_Unit)


Before previous Year

sum({< Sold_Year = {"$(=Max(Sold_Year)-2)"}>} [inv value]/Sales_INR_Unit)


so i want expression for LFL sales comparison

expression :-

=num(

(

sum(Aggr(

if(

sum({< Sold_Year = {"$(=Max(Sold_Year))"}>} [inv value]/Sales_INR_Unit) > 0

and

sum({< Sold_Year = {"$(=Max(Sold_Year)-1)"}>} [inv value]/Sales_INR_Unit) > 0 > 0,

sum({< Sold_Year = {"$(=Max(Sold_Year)-1)"}>} [inv value]/Sales_INR_Unit)/100000)

,[StoreName]))

/

sum(Aggr(

if(

sum({< Sold_Year = {"$(=Max(Sold_Year))"}>} [inv value]/Sales_INR_Unit) > 0

and

sum({< Sold_Year = {"$(=Max(Sold_Year)-1)"}>} [inv value]/Sales_INR_Unit) > 0 > 0,

sum({< Sold_Year = {"$(=Max(Sold_Year)-1)"}>} [inv value]/Sales_INR_Unit)/100000)

,[StoreName]))

)-1

,'#,##0%')

but above following expression is not giving me any result

regards

saksham

2 Replies
shiveshsingh
Master
Master

Can u share sample app?

prma7799
Master III
Master III

check this

=num(

(

sum(Aggr(

if(

sum({< Sold_Year = {"$(=Max(Sold_Year))"}>} [inv value]/Sales_INR_Unit) > 0

and

sum({< Sold_Year = {"$(=Max(Sold_Year)-1)"}>} [inv value]/Sales_INR_Unit) > 0 ,

sum({< Sold_Year = {"$(=Max(Sold_Year)-1)"}>} [inv value]/Sales_INR_Unit)/100000)

,[StoreName]))

/

sum(Aggr(

if(

sum({< Sold_Year = {"$(=Max(Sold_Year))"}>} [inv value]/Sales_INR_Unit) > 0

and

sum({< Sold_Year = {"$(=Max(Sold_Year)-1)"}>} [inv value]/Sales_INR_Unit) > 0 ,

sum({< Sold_Year = {"$(=Max(Sold_Year)-1)"}>} [inv value]/Sales_INR_Unit)/100000)

,[StoreName]))

)-1

,'#,##0%')