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: 
prabunakil
Contributor III
Contributor III

Expression

Hi all, please assist to share the expression.

My criteria is as per below:

1. [Bill Type] = {'ZLF2'}, [KSCHL]={'Z1PR'}

2. [Billing Item] = [Billing Item2]

3. Sum [KONV_KWERT]

13 Replies
jyothish8807
Master II
Master II

Try this:

Sum( {<[Billing Item] = p([Billing Item2]) , [Bill Type] =  {'ZLF2'} ,[KSCHL]={'Z1PR'} >}  [KONV_KWERT])


Br,

KC

Best Regards,
KC
jyothish8807
Master II
Master II

else you can try this also,

sum(if([Billing Item]=[Billing Item2] and match([Bill Type],'ZLF2')=1 and match([KSCHL],'Z1PR')=1, [KONV_KWERT]))

Best Regards,
KC
PrashantSangle

or

if([Billing Item]=[Billing Item2],sum({<[Bill Type]={"ZLF2"},[KSCHL]={'Z1PR'}>} [KONV_KWERT]))


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 🙂
jonathandienst
Partner - Champion III
Partner - Champion III

You can't do a row by row comparison directly using set analysis. The set filter is applied before the chart is built and not row by row.

You can use a Sum(if()) construct:

Sum({<[Bill Type] =  {'ZLF2'}, [KSCHL] = {'Z1PR'}>} If([Billing Item] = [Billing Item2], [KONV_KWERT]))

Or if you have a suitable ID field, you could try:

Sum({<[SomeIDField = {"$(=[Billing Item] = [Billing Item2])"}, [Bill Type] = {'ZLF2'}, [KSCHL] = {'Z1PR'}>} [KONV_KWERT])


Or you could derive a flag field in the load script to indicate when the two fields are alike. That may not be easy in your case because they are not in the same table.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein