Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Set Analysis inside of Set analysis

Hi

Need some help to figure out a set inside another set. I thought my expression will work in straight table


 
sum({<Taxable={1}, TaxType={'03'}, Group={'0000'}, Item ={'000'}, Effective={"=$(MAx({<Taxable={1}, Group={ '0000'}, Item ={ '000'}, TaxType={'03'}>} Effective))"}>}  distinct   TaxRate)

If I replace my set analysis inside set to find the max date with a constant then expression is working correctly.  Any help is appreciated to solve this.

39 Replies
sunny_talwar

Would you be able to point out in the attached sample what is wrong and what is that you need to get?

Anonymous
Not applicable
Author

Problem, is that it sum all the records that  meet condition but I need to check no duplicate records to add up. Description is same then need to omit , I can't have Description field as dimension.

sunny_talwar

How about this

Sum({<Taxable = {'1'}, TaxType = {'02'}, Group = {'0000'}, Item = {'000'}, MinTaxBase = {'0.00'}>} Aggr(Only({<Taxable = {'1'}, TaxType = {'02'}, Group = {'0000'}, Item = {'000'}, MinTaxBase = {'0.00'}>} TaxRate), Description))

Anonymous
Not applicable
Author

Turning always 0., may be something missing here. the condition seems to be what I need but not working on pivot table or straight table.

sunny_talwar

Don't know, unless you can provide more details, I won't know.

All the best

Anonymous
Not applicable
Author

If you see the picture below, City Tax, last two fields. The one has value is with the set expression you have given and the second one is with aggr express. Same condition but with Aggr function turns to 0

I have Data like below

Any help is appreciated.

sunny_talwar

What is the problem with set analysis?

Anonymous
Not applicable
Author

Which will add duplicate amount when more than one record present , duplicate is based on Description value. I need to add unique records only

sunny_talwar

So you might have two rows for city tax and you don't want to sum them? Does both the rows have same tax value? If not, then how would you handle it? Can you show a scenario where there are 2 city tax row with same value and the expression isn't working?

Anonymous
Not applicable
Author

I will find out and let you know.

Thanks you so much for your help.