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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
bimala0507
Partner - Creator
Partner - Creator

Problem with Set Analysis

Hi Experts:

Can anyone say me, what is wrong with Below expression

if(id1=1,num(sum({$<Year_F_SHIP_DATE={$(=max(Factory_Assesment_Year))}>}[Qty (Pcs)]), '#,##0'),if (id1=0,num(sum({$<Year_B_SHIP_DATE={$(=max(Factory_Assesment_Year))}>}[Qty (Pcs)]), '#,##0')))

Here Factory_Assesment_Year is the Year, what user Select

And Year_F_SHIP_DATE is what the Year, I would like to compare with

Appreciate your immediate attention

Kind Regards,

Bimala

4 Replies
danieloberbilli
Specialist II
Specialist II

Why do you consider it as wrong? What result do you get and what result are you aiming for? Do you use it in the script, as a dynamic dimension or as a expression?

PrashantSangle

Hi,

Try with "" double quote

try below

if(id1=1,num(sum({$<Year_F_SHIP_DATE={"$(=max(Factory_Assesment_Year))"}>}[Qty (Pcs)]), '#,##0'),

if (id1=0,num(sum({$<Year_B_SHIP_DATE={"$(=max(Factory_Assesment_Year))"}>}[Qty (Pcs)]), '#,##0')))

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable

Your expression should contain single quote '

as follows:

{'$(=max(Factory_Assesment_Year))'}

and you have

{$(=max(Factory_Assesment_Year))}


Question : Why you use Max ?, is it because a user can select more than one Year  and you are trying to select just the top value of the possible selection?.


Regards,


ToniKautto
Employee
Employee

The answer to your question will depend on what your data looks like, and what you are trying to do. A correct syntax does not guarantee the calculated result is as expected.

Please provide a sample application with data and details on what results you expect.