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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Set analysis not working properly

Hi all

I have this expression which i can't get to work properly,

Sum({<FrontLossFlag ={'*'} - {'1'}, DataSource = {'*'} - {'DPW' , 'DEX (DPW)' }>} Real)

If I remove either 'DPW' or 'DEX (DPW)', then it works. But not if both a left inside the expressions, then it return the value of zero, which isn't correct.

I can't seem to figure what I'm doing wrong? I've also tried inserting '[ DEX (DPW) ] ', however this doesn't return the correct value either.

I hope someone can help

Regards

Stefan

23 Replies
Anil_Babu_Samineni

Interesting, Condition should work. We must need some UAT for Real values. Will you provide sample application

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
antoniotiman
Master III
Master III

Can You provide some sample data ?

Kushal_Chawda

try this

sum({<FrontLossFlag ={'*'} - {'1'}, DataSource = {'*'} - {'DPW' , '$(='DEX ' & chr(40)&'DPW' &chr(41))'}>} Real)

Anil_Babu_Samineni

Kushal Bhai,

Why are you using Chr() over here. Even, We can direct use this DEX (DPW) right??? Just to know

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

I have hard time providing a sample data right now.

However, if I split the expression up as below I can get it to work.

Sum(Real)

-Sum({<FrontLossFlag ={'1'}>} Real)

-Sum({<DataSource ={'DPW'}>} Real)

-Sum({<DataSource ={'DEX (DPW)'}>} Real)

It definitely seems like this part DataSource ={'DPW' , 'DEX (DPW)' } of the expression i causing the problem. But only when these two are put together {'DPW' , 'DEX (DPW)' }.

Not applicable
Author

Doesn't solve the root problem, but at least you can have it working in one expression with something like this:

Sum({

<FrontLossFlag =, DataSource =>

-

<FrontLossFlag ={'1'}, DataSource = {'DPW'}>

-

<DataSource = {'DEX (DPW)' }>

}


Real)

Anil_Babu_Samineni

What i said may root cause, Will you take these filters FrontLossFlag, DataSource and Select 1 from FrontLossFlag and select remaining two names from DataSource and then create Text box with Sum(Real) then tell me what you are getting. Meanwhile clear those and use below condition in text box

Sum({<FrontLossFlag ={'1'}, DataSource = {'DPW','DEX (DPW)'}>}Real)


PS - your question not in the list but you are concluding the with iCn the list filter. Hence check opposite if first thread is the correct post.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

I get a number when I use the filters and Sum(Real) in textbox.

If clear the filters and insert Sum({<FrontLossFlag ={'1'}, DataSource = {'DPW','DEX (DPW)'}>}Real), then the value Zero i shown.

Anil_Babu_Samineni

Now, Time to have sample application

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Kushal_Chawda

This not the big script,just a simple condition, you can try to check this out