Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Live chat with experts, bring your API Integration questions. June 15th, 10 AM ET. REGISTER TODAY
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))