Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
agni_gold
Specialist III
Specialist III

nested aggregation not allowed

Hi Friends,

(sum({<[Planning Versions]={"$(=Right(Year(Today()),1)&Num(vG_FN_CurrentMonth-1,'00'))"}>}

[Sales Plan in KS]*(if(ASP=0 and PLC=6.2 , Max(PMIN),ASP))))



is there any alternative?

7 Replies
Anil_Babu_Samineni

Looks like better approach only, try this?

(sum({<[Planning Versions]={"$(=Right(Year(Today()),1)&Num(vG_FN_CurrentMonth-1,'00'))"}>}

[Sales Plan in KS])*sum({<ASP = {0}, PLC ={'6.2'}, PMI={'$(=max(PMI))'}>}ASP))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
agni_gold
Specialist III
Specialist III
Author




sum({<ASP = {0}, PLC ={'6.2'}, PMI={'$(=max(PMI))'}>}ASP))


and


if(ASP=0 and PLC=6.2 , Max(PMIN),ASP))



are same?

agni_gold
Specialist III
Specialist III
Author

gwassenaar‌  , any help, please.

Anil_Babu_Samineni

I've notice now. Two are not the same and this condition works as same when you apply max statement in first expression then you may get answer. Let's wait sunny response stalwar1

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
vishsaggi
Champion III
Champion III

Try this may be:

= sum({<

                [Planning Versions] = { "$(=Right(Year(Today()),1)&Num(vG_FN_CurrentMonth-1,'00'))"}

           >}  [Sales Plan in KS]

           ) * if(ASP = 0 and PLC = 6.2 , Max(PMIN), ASP)

agni_gold
Specialist III
Specialist III
Author

will it do row by row multiplication?

vishsaggi
Champion III
Champion III

Did you try, it should. What chart object are you using?