Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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.          

1 Reply
sunny_talwar

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))