Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
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
Anonymous
Not applicable
Author

Please see picture below

If I select first element then values will appear in next column

sunny_talwar

Are we looking at County Sales Tax column that after selection the value become 0.1? Do you want to see 0.01 without selection also?

Anonymous
Not applicable
Author

Correct values are appearing only after any selection on the chart else it turns to zero. .01 should present always but not.

sunny_talwar

Try this

=FirstSortedValue(DISTINCT {<Taxable={1}, TaxType={'04'}, Group={'0100'}, Item ={'001'}>} [Tax Tate], -Effective)

Anonymous
Not applicable
Author

Thank you so much.... Perfectly working this for me.

Anonymous
Not applicable
Author

Hi, Thanks for all your help, Just wondering if I need to sum up based on Description field , I wrote a like

sum( aggr( ifTaxable='1' and TaxType='02' and Group='0000' and Item ='000' and MinTaxBase = '0.00',  TaxRate  ) ,Description)) but this gives always zero. I am not sure where I am making mistake.

sunny_talwar

Not sure I understand... what exactly are you doing?

Anonymous
Not applicable
Author

I have to sum  total tax if Description is different only when above condition satisfy, so I did sum and in if condition and aggr function for field description but it always turns to 0.

sunny_talwar

May be this

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

Anonymous
Not applicable
Author

This one I tried and not working, only if and sum is working. But I am not able to sum only in case of different description,. Description filed may have same value, in that case I don't need to sum it.