Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
noman212
Creator III
Creator III

Expression Issue

Hi

i have the following expression but its shows no value against this expression.

Please find attachment,

Formula to Calculate Annaulized Premium is given below

Annualized Premium=if(ModeType='A',sum({$<statuscode={'13'}>} Annual),if(ModeType='H',sum({$<statuscode={'13'}>} Half),if(ModeType='Q',sum({$<statuscode={'13'}>} Quar),sum({$<statuscode={'13'}>} Monthly))))

Expression which i want to Display in atext Object:

= 'Rank 1 : '& CHR(10) &

'Client Name - '& FirstSortedValue(Clientname, -Aggr(SUM(if(ModeType='A',sum({$<statuscode={'13'}>} Annual),if(ModeType='H',sum({$<statuscode={'13'}>} Half),if(ModeType='Q',sum({$<statuscode={'13'}>} Quar),sum({$<statuscode={'13'}>} Monthly))))),Clientname)) & CHR(10) &

'Proposal - '& FirstSortedValue(Proposal, -Aggr(SUM(if(ModeType='A',sum({$<statuscode={'13'}>} Annual),if(ModeType='H',sum({$<statuscode={'13'}>} Half),if(ModeType='Q',sum({$<statuscode={'13'}>} Quar),sum({$<statuscode={'13'}>} Monthly))))),Clientname)) & CHR(10) &

'Annual Premium - '& FirstSortedValue(Aggr(SUM(if(ModeType='A',sum({$<statuscode={'13'}>} Annual),if(ModeType='H',sum({$<statuscode={'13'}>} Half),if(ModeType='Q',sum({$<statuscode={'13'}>} Quar),sum({$<statuscode={'13'}>} Monthly))))),Clientname), -Aggr(SUM(if(ModeType='A',sum({$<statuscode={'13'}>} Annual),if(ModeType='H',sum({$<statuscode={'13'}>} Half),if(ModeType='Q',sum({$<statuscode={'13'}>} Quar),sum({$<statuscode={'13'}>} Monthly))))),Clientname)) & CHR(10) &

'Risk - '& FirstSortedValue(Aggr(SUM(sumatrisk),Clientname), -Aggr(SUM(if(ModeType='A',sum({$<statuscode={'13'}>} Annual),if(ModeType='H',sum({$<statuscode={'13'}>} Half),if(ModeType='Q',sum({$<statuscode={'13'}>} Quar),sum({$<statuscode={'13'}>} Monthly))))),Clientname)) & CHR(10) &

'Consultant Name - '& FirstSortedValue(ConsultantName, -Aggr(SUM(if(ModeType='A',sum({$<statuscode={'13'}>} Annual),if(ModeType='H',sum({$<statuscode={'13'}>} Half),if(ModeType='Q',sum({$<statuscode={'13'}>} Quar),sum({$<statuscode={'13'}>} Monthly))))),Clientname)) & CHR(10) &

'Branch Name - '& FirstSortedValue(BranchName, -Aggr(SUM(if(ModeType='A',sum({$<statuscode={'13'}>} Annual),if(ModeType='H',sum({$<statuscode={'13'}>} Half),if(ModeType='Q',sum({$<statuscode={'13'}>} Quar),sum({$<statuscode={'13'}>} Monthly))))),Clientname))

1 Solution

Accepted Solutions
noman212
Creator III
Creator III
Author

= 'Rank 1 : '& CHR(10) &

'Client Name - '& FirstSortedValue(Clientname, -AGGR(if(ModeType='A',sum({$<statuscode={'13'}>} Annual),if(ModeType='H',sum({$<statuscode={'13'}>} Half),if(ModeType='Q',sum({$<statuscode={'13'}>} Quar),sum({$<statuscode={'13'}>} Monthly)))),Clientname)) & CHR(10) &

'Proposal - '& FirstSortedValue(Proposal, -AGGR(if(ModeType='A',sum({$<statuscode={'13'}>} Annual),if(ModeType='H',sum({$<statuscode={'13'}>} Half),if(ModeType='Q',sum({$<statuscode={'13'}>} Quar),sum({$<statuscode={'13'}>} Monthly)))),Clientname)) & CHR(10) &

'Annual Premium - '& FirstSortedValue(AGGR(if(ModeType='A',sum({$<statuscode={'13'}>} Annual),if(ModeType='H',sum({$<statuscode={'13'}>} Half),if(ModeType='Q',sum({$<statuscode={'13'}>} Quar),sum({$<statuscode={'13'}>} Monthly)))),Clientname), -AGGR(if(ModeType='A',sum({$<statuscode={'13'}>} Annual),if(ModeType='H',sum({$<statuscode={'13'}>} Half),if(ModeType='Q',sum({$<statuscode={'13'}>} Quar),sum({$<statuscode={'13'}>} Monthly)))),Clientname)) & CHR(10) &

'Risk - '& FirstSortedValue(Aggr(SUM(sumatrisk),Clientname), -AGGR(if(ModeType='A',sum({$<statuscode={'13'}>} Annual),if(ModeType='H',sum({$<statuscode={'13'}>} Half),if(ModeType='Q',sum({$<statuscode={'13'}>} Quar),sum({$<statuscode={'13'}>} Monthly)))),Clientname)) & CHR(10) &

'Consultant Name - '& FirstSortedValue(ConsultantName, -AGGR(if(ModeType='A',sum({$<statuscode={'13'}>} Annual),if(ModeType='H',sum({$<statuscode={'13'}>} Half),if(ModeType='Q',sum({$<statuscode={'13'}>} Quar),sum({$<statuscode={'13'}>} Monthly)))),Clientname)) & CHR(10) &

'Branch Name - '& FirstSortedValue(BranchName, -AGGR(if(ModeType='A',sum({$<statuscode={'13'}>} Annual),if(ModeType='H',sum({$<statuscode={'13'}>} Half),if(ModeType='Q',sum({$<statuscode={'13'}>} Quar),sum({$<statuscode={'13'}>} Monthly)))),Clientname))

View solution in original post

3 Replies
sushil353
Master II
Master II

Hi,

Try if this works for you

= 'Rank 1 : '& CHR(10) &

'Client Name - '& Concat(FirstSortedValue(Clientname, -Aggr(SUM(if(ModeType='A',sum({$<statuscode={'13'}>} Annual),if(ModeType='H',sum({$<statuscode={'13'}>} Half),if(ModeType='Q',sum({$<statuscode={'13'}>} Quar),sum({$<statuscode={'13'}>} Monthly))))),Clientname)),',')

noman212
Creator III
Creator III
Author

Nope, Error in Expression

noman212
Creator III
Creator III
Author

= 'Rank 1 : '& CHR(10) &

'Client Name - '& FirstSortedValue(Clientname, -AGGR(if(ModeType='A',sum({$<statuscode={'13'}>} Annual),if(ModeType='H',sum({$<statuscode={'13'}>} Half),if(ModeType='Q',sum({$<statuscode={'13'}>} Quar),sum({$<statuscode={'13'}>} Monthly)))),Clientname)) & CHR(10) &

'Proposal - '& FirstSortedValue(Proposal, -AGGR(if(ModeType='A',sum({$<statuscode={'13'}>} Annual),if(ModeType='H',sum({$<statuscode={'13'}>} Half),if(ModeType='Q',sum({$<statuscode={'13'}>} Quar),sum({$<statuscode={'13'}>} Monthly)))),Clientname)) & CHR(10) &

'Annual Premium - '& FirstSortedValue(AGGR(if(ModeType='A',sum({$<statuscode={'13'}>} Annual),if(ModeType='H',sum({$<statuscode={'13'}>} Half),if(ModeType='Q',sum({$<statuscode={'13'}>} Quar),sum({$<statuscode={'13'}>} Monthly)))),Clientname), -AGGR(if(ModeType='A',sum({$<statuscode={'13'}>} Annual),if(ModeType='H',sum({$<statuscode={'13'}>} Half),if(ModeType='Q',sum({$<statuscode={'13'}>} Quar),sum({$<statuscode={'13'}>} Monthly)))),Clientname)) & CHR(10) &

'Risk - '& FirstSortedValue(Aggr(SUM(sumatrisk),Clientname), -AGGR(if(ModeType='A',sum({$<statuscode={'13'}>} Annual),if(ModeType='H',sum({$<statuscode={'13'}>} Half),if(ModeType='Q',sum({$<statuscode={'13'}>} Quar),sum({$<statuscode={'13'}>} Monthly)))),Clientname)) & CHR(10) &

'Consultant Name - '& FirstSortedValue(ConsultantName, -AGGR(if(ModeType='A',sum({$<statuscode={'13'}>} Annual),if(ModeType='H',sum({$<statuscode={'13'}>} Half),if(ModeType='Q',sum({$<statuscode={'13'}>} Quar),sum({$<statuscode={'13'}>} Monthly)))),Clientname)) & CHR(10) &

'Branch Name - '& FirstSortedValue(BranchName, -AGGR(if(ModeType='A',sum({$<statuscode={'13'}>} Annual),if(ModeType='H',sum({$<statuscode={'13'}>} Half),if(ModeType='Q',sum({$<statuscode={'13'}>} Quar),sum({$<statuscode={'13'}>} Monthly)))),Clientname))