Skip to main content
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
pradosh_thakur
Master II
Master II

Try this

I have deleted the space. it should work.


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



regards

Pradosh


Learning never stops.
its_anandrjs

Try to write another variable and do this with variable

Let vTaxVariable = 'Taxable={1}, Group={ '0000'}, Item ={ '000'}, TaxType={'01'}';

=Sum( {<Taxable ={1}, TaxType ={'01'}, Group ={'0000'}, Item ={'000'}, Effective ={"<=$(=Max({< $(vTaxVariable)>} Effective))>}"} >} Distinct TaxRate)

Anonymous
Not applicable
Author

If I do in script num(Effective) will convert numeric ?, I put same in the chart and not doing properly. What I found that when I use >= or <= Effective values are coming but compare '=' then it turns to 0.

stabben23
Partner - Master
Partner - Master

Will the use of maxstring instead of max change anything for you?

Anonymous
Not applicable
Author

I had attached a sample .qvw, . I want to pick only  one record with Max effective date. Any help is appreciated. I tried MaxString and turned to 0 value.

pradosh_thakur
Master II
Master II

Did you try the above code i sent . In set analysis if you have space while using  >= or <= it will not work(it will not include that set and ignore it ) so remove if there is any space and try .

regards

Pradosh

Learning never stops.
tamilarasu
Champion
Champion

Hi Balaji,

Try this,

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

sunny_talwar

Some of the values in your attached app are not available... I have changed your expression to what was available and it seems to give values

=Sum({<Taxable={1}, TaxType={'04'}, Group={'0100'}, Item ={'001'}, Effective={"$(=Max({<Taxable = {1}, Group = {'0100'}, Item = {'001'}, TaxType = {'04'}>} Effective))"}>} DISTINCT [Tax Tate])

Note, I tried it in a text box, but it should work in straight table also.

Anonymous
Not applicable
Author

Thanks, Still have problem when I have more than one column in the table only one column (last One) has value all other column turned to 0, no set calculation happens. Not sure why this happening.

Any way thanks for the help in advance.

sunny_talwar

Would you be able to share an image of what you are seeing and explain what is wrong in the image?