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

How can I have the date just before the max/last Date and repeat the process on the whole table?

Hello,

I'm trying to calculate the delta between two values in different dates : the firt is the date Max(COD)

 ( Sum({<COD={"$(=Max(COD))"}>*<Contrat={'PRESTA'}>} if([FMonth.autoCalendar.Num]<>[COD.autoCalendar.Num], CapaPresta)) * 130/Hours +(sum( {<COD={"$(=Max(COD))"} >} if(Contrat = 'PRESTA' , Actual)) +     sum( {<COD={"$(=Max(COD))"}>} if(Contrat = 'PRESTA' , Actual_hors_site)))* 130/Hours

 Now i'm trying to calculate the same value for the date before the max(COD) so I tried this: I replaced the Max(COD) by :

{<COD={"$(=monthend(addmonths(Max(COD), -1)))

 But it doesn't work.

2 Replies
Anil_Babu_Samineni

What it is returning in KPI?

monthend(addmonths(Max(COD), -1))

 

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
shyrinesam22
Contributor II
Contributor II
Author

 

Hi Anil Babu Samineni,

It's returnig 30/04/2019.

(COD is the last date of the current month which is 31/05/2019)