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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Nora104
Partner - Creator
Partner - Creator

Why doesn't the formula work?

As the below, the formula doesn't work:

sum({<Store_Name={"=sum({<WeekName={"2020/52"}>}SO_RealAmt)>0 and sum({<WeekName{"2019/52"}>}SO_RealAmt)>0"}>}SO_RealAmt)

 

Is there anyone know how to modify?

5 Replies
Almen
Creator II
Creator II

What are you trying to achieve here? It looks like 

 

sum({<Store_Name={"=sum({<WeekName={"2020/52"}>}SO_RealAmt)>0

 

is part of a condition but 

and sum({<WeekName{"2019/52"}>}SO_RealAmt)>0"}>}SO_RealAmt)

 

has no condition attached to it. 

Nora104
Partner - Creator
Partner - Creator
Author

the blue is the condition:

2.png

Store_Name satisfy both two conditions:

1.sum({<WeekName={"2020/52"}>}SO_RealAmt)>0

2.sum({<WeekName={"2019/52"}>}SO_RealAmt)>0

tresB
Champion III
Champion III

Change the quotes (to single) for inner modifiers like:

sum({<Store_Name={"=sum({<WeekName={'2020/52'}>}SO_RealAmt)>0 and sum({<WeekName{'2019/52'}>}SO_RealAmt)>0"}>}SO_RealAmt)

Nora104
Partner - Creator
Partner - Creator
Author

Thank you!It works!

But another problem is :

Another condition is that [Store_Name] is required to be the same [Store_Region] in 2020/52 and 2019/52.

Store_Name and Store_Region are both field names.

It seems difficult to limit in the formula.

What do you think?

tresB
Champion III
Champion III

Let's close this one by giving like/marking correct answer, and then move to another problem. For another problem, try to create a sample app/data and explain your expected output in that context - in a new post may be.