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

Expression help with Max function.

How can I put the below expression in Text Object

I know max(NoOfMonthsCY) is throwing it off..ID is the PK.

=sum(if(StartdateYear = EndtdateYear,ExpenseAmountLocal*NoOfMonthsnew,

     if(StartdateYear<=year(today()),

       if(EndtdateYear>=year(today()),ExpenseAmountLocal * max(NoOfMonthsCY)))))         

Thank you.          

Labels (1)
1 Reply
sunny_talwar
MVP
MVP

Not entirely sure of what you doing, but may be this?

=Sum(

     Aggr(

          If(StartdateYear = EndtdateYear, ExpenseAmountLocal*NoOfMonthsnew,

          if(StartdateYear<=year(today()),

          If(EndtdateYear>=year(today()), ExpenseAmountLocal * max(NoOfMonthsCY)))), PK))