Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
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

2 Replies
Gysbert_Wassenaar

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
Luminary Alumni
Luminary Alumni

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.