Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Become an analytics expert with Qlik's new 15 week course: Applied Data Analytics using Qlik Sense. READ 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))