Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Support Case Portal will move to Qlik Community Oct 4. Temporary case outage Oct 3. READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
suheshreddy
Contributor III
Contributor III

If with aggregation not working in UI

Hi All,

I am trying to compare a field with an aggregation of another field but I am not successful in doing so, can someone please help me if I am missing something simple in it.

I am using below code 

max(aggr(if(MIN <= (sum({<YEAR = {'2019'}>}SALES)/
((sum({<YEAR = {'2018'}>}SALES)
+sum({<YEAR = {'2017'}>}SALES))/2)),REBATE),PAYER))

 

Below code works but I want it to calculate at each dimension

max({<MIN = {"<=$(= sum({<YEAR = {'2019'}>}SALES)/
((sum({<YEAR = {'2018'}>}SALES)
+sum({<YEAR = {'2017'}>}SALES))/2))"}>}
REBATE)

 

please find the attached sample app for my data set.

Labels (3)
1 Solution

Accepted Solutions
sunny_talwar

May be this

Max(Aggr(
If(MIN <= (Sum(TOTAL <PAYER> {<YEAR = {'2019'}>} SALES)/
((Sum(TOTAL <PAYER> {<YEAR = {'2018'}>} SALES) 
+Sum(TOTAL <PAYER> {<YEAR = {'2017'}>}SALES))/2)), REBATE)
, PAYER, MIN))

View solution in original post

2 Replies
sunny_talwar

May be this

Max(Aggr(
If(MIN <= (Sum(TOTAL <PAYER> {<YEAR = {'2019'}>} SALES)/
((Sum(TOTAL <PAYER> {<YEAR = {'2018'}>} SALES) 
+Sum(TOTAL <PAYER> {<YEAR = {'2017'}>}SALES))/2)), REBATE)
, PAYER, MIN))

View solution in original post

suheshreddy
Contributor III
Contributor III
Author

It worked.

Thanks,