Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
rupaliqlik
Creator
Creator

calculate trend on latest date

Hi Team,

I want to calculate the trend formula.

MTD ACT of Latest Date / Calendar Datecount up to this Latest Date * Date of the Month

"Latest Date" does NOT mean "Todays date".
rupaliqlik_0-1629782091098.png

We have Act data till 19th August and MTD Actual is nothing but cumulative of ACT

MTD ACT of Latest Date=19-08-2021

Calendar Date count up to this Latest Date=19

Date of the Month=1 to 31 days() so multiplied by 1 ,2 and so on till 31)

So I have to calculate (554089323/19)*1  ,(554089323/19)*2

My main concern is today is 24th then how would I Get  19 number.

Please suggest me how to build up formula.

SUM({$<Date={">=$(v_MonthStartDate)<=$(v_MonthEndDate)"}>} condition_value)/$(v_LatestActualDate)*
only({<Date={">=$(v_MonthStartDate)<=$(v_MonthLastday)"}>}day(Date))

@Sunny_talwar, @Swuehl,@ kaushik.solanki ,@

BR,

Rupali

 

1 Reply
saniyask
Creator
Creator

Hi,

While calculating the MonthEndDate variable use the Max of the ACT which is 19th so it will take values from start of the month until the max date which is available in ACT field 

 

Regards,

Saniya