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: 
kamal_sanguri
Specialist
Specialist

How to use function in Set Analysis

Hi Experts,

I want to use a function in Set Analysis.

Something like this.

=sum(<Len(Comments) > {'5'}> CHARGES)

But dont know how to use it correctly.. Any help would be greatly appreciated.

Thanks,

-Kamal

1 Solution

Accepted Solutions
ramoncova06
Partner - Specialist III
Partner - Specialist III

I agree with Kaushik in the backend changes

though if you are not able to do that then try with

=sum({< CHARGES = {"=Len(Comments) > 5"} >}CHARGES)

View solution in original post

3 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Better you create Len(Comments) as lengthOfComments as new field in script and then use the below set expression.

Sum({<lengthOfComments  = {">5"}Charges)

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
ramoncova06
Partner - Specialist III
Partner - Specialist III

I agree with Kaushik in the backend changes

though if you are not able to do that then try with

=sum({< CHARGES = {"=Len(Comments) > 5"} >}CHARGES)

maxgro
MVP
MVP

small example

script

load

  rowno() as Id,

  floor(rand()*10) as Id2,

  floor(rand()*100) as CHARGES,

  99999 + floor(rand()*2) as  Comments

AutoGenerate 100;

chart with this expression

sum({$ <Id={"=len(Comments)>5"}>} CHARGES)

you can find more detail here

Set Analysis: syntaxes, examples