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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
rathnam_qv
Creator
Creator

expression

Hi All,

i have the following query i want to write it in my expression by using set analysis

how can we do this...

select sum(DEPOSIT_SUM) from Compliance.SOD_RANK_BY_AA_NOSTATES where BR_ASSESSMENT_AREA='Albany' and name= 'SunTrust Bank'

 

divided by

 

select Sum(DEPOSIT_SUM) from Compliance.SOD_RANK_BY_AA_NOSTATES where name= 'SunTrust Bank'

Note**   BR_ASSESSMENT_AREA='Albany' for example i given this ,but i have no.of Assessment Areas. i want to calculate for all

Labels (1)
4 Replies
jagan
Partner - Champion III
Partner - Champion III

Hi,

Try like this

=sum({<BR_ASSESSMENT_AREA={'Albany', ...................}, name= {'SunTrust Bank'}>}DEPOSIT_SUM) /

Sum({<name= {'SunTrust Bank'}>}DEPOSIT_SUM)

Hope it helps you.

Regards,

Jagan.

lironbaram
Partner - Master III
Partner - Master III

hi

not quite sure what you want to achieve ,

but i think you don't need set analysis , in set analysis you define values to be selected in the field

why not use a table or a chart where the BR_ASSESSMENT_AREA will be the dimension

and your expression will be sum(DEPOSIT_SUM)/sum(total <name> DEPOSIT_SUM)

this will give you the result you searched above

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You can't use set analysis in the script that loads data. If you've already loaded the data and want to create a chart expressions try:

sum({<BR_ASSESSMENT_AREA={'Albany'}, name={'SunTrust Bank'}>}DEPOSIT_SUM) /

sum({<name={'SunTrust Bank'}>}DEPOSIT_SUM).

If you need the show this in a straight table for all areas then use BR_ASSESSMENT_AREA as dimension and use this expression:

sum({<name={'SunTrust Bank'}>}DEPOSIT_SUM) / sum({<name={'SunTrust Bank'}>} total DEPOSIT_SUM)


talk is cheap, supply exceeds demand
rathnam_qv
Creator
Creator
Author

Hi Liron,

i have many Assessment Areas..i con't give all names...is there any way the expression should take all assessments areas names on its own