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: 
dhanu_today
Creator
Creator

Logic Help(Aggr with Max value)

Hi Everyone,

I have 3 categories.The 2 expressions for two categories are working fine and coming to third category logic level I have Number field more than one time then that cases I have to capture the highest amount only.(i.e. only for the 3 expression only not for the first and second)

The logics which I have written in the expressions are below;

Exp1:Working Fine

sum({<SAL_CREDIT_MNTH = {"May"},CATEGORY ={"Salary Mnemonics"}>}AMOUNT)

Exp2:Working Fine

sum({<SAL_CREDIT_MNTH = {"May"},CATEGORY ={"Salary Narrations"},Number =E({<CATEGORY ={"Salary Mnemonics"}>})>}AMOUNT)

Exp3:

sum({<SAL_CREDIT_MNTH = {"May"},CATEGORY ={"Above 5000"},Number =E({<CATEGORY ={"Salary Mnemonics","Salary Narrations"}>})>}AMOUNT)

Dummy Logic:

AGGR(MAX(AMOUNT),Number)

How to add the dummy logic expression to the Exp3.

Thanks,

Dhanu

Labels (1)
2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

I have no idea what you're really asking. Maybe this?

max({<SAL_CREDIT_MNTH = {"May"},CATEGORY ={"Above 5000"},Number =E({<CATEGORY ={"Salary Mnemonics","Salary Narrations"}>})>}AMOUNT)


talk is cheap, supply exceeds demand
jagan
Partner - Champion III
Partner - Champion III

Hi,

Try this expression

Since you have Number as dimension you don't need Aggr()

MAX({<SAL_CREDIT_MNTH = {"May"},CATEGORY ={"Above 5000"},Number =E({<CATEGORY ={"Salary Mnemonics","Salary Narrations"}>})>} AMOUNT)

OR

sum({<SAL_CREDIT_MNTH = {"May"},CATEGORY ={"Above 5000"},Number =E({<CATEGORY ={"Salary Mnemonics","Salary Narrations"}>})>}

AGGR(MAX({<SAL_CREDIT_MNTH = {"May"},CATEGORY ={"Above 5000"},Number =E({<CATEGORY ={"Salary Mnemonics","Salary Narrations"}>})>} AMOUNT),Number))

OR

AGGR(MAX({<SAL_CREDIT_MNTH = {"May"},CATEGORY ={"Above 5000"},Number =E({<CATEGORY ={"Salary Mnemonics","Salary Narrations"}>})>} AMOUNT),Number)

Regards,

jagan.