Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Karim_Khan
Creator III
Creator III

How to show previous month last day value

Hi Team,

   I have tried the approach but not able to show only those values in current month 

which are not purchased on the last working day of previous month

and rest of the value of current month also should got exclude

I have tried belwo expression also

=IF(DATE<>'$(vPrevMonthLast)' AND Pur_Cd='Purchase',Only({$<DATE={">=$(vFromDate)<=$(vToDate)"}>} ID))

but above expression is taking current month ID also which i do not want

vPrevMonthLast=Need to take last working day of previous month'

PFA

Regards,

KK

KK
13 Replies
vishsaggi
Champion III
Champion III

Try like

= MonthEnd(AddMonths(YourDateField, -1))

Chanty4u
MVP
MVP

what is the variable value?

use this in variable

monthend(Datefield, -1)

Karim_Khan
Creator III
Creator III
Author

I already have variable value

=MaxString({<TRADE_DATE={"<$(=Date(vTradeFrom))"}>}DATE)

KK
Karim_Khan
Creator III
Creator III
Author

=MaxString({<TRADE_DATE={"<$(=Date(vTradeFrom))"}>}DATE)

KK
Chanty4u
MVP
MVP

what is the result you are getting  for your variable?

vishsaggi
Champion III
Champion III

Where in your variable you want this last day of the previous month?

vishalarote
Partner - Creator II
Partner - Creator II

Try this hope so it will help you

vmindate=Date(min(TRADE_DATE))

vmaxdate=Monthend(Date(Max(TRADE_DATE)),-1)

Set Analysis :

=maxstring({<TRADE_DATE={">=$(vmindate)<=$(vmaxdate)"}>}DATE)

sasiparupudi1
Master III
Master III

Try

MonthEnd(Max({<TRADE_DATE={"<$(=Date(vTradeFrom))"}>}DATE),-1)

Karim_Khan
Creator III
Creator III
Author

am able to find out the last workin day of previous month but the logic which m trying is not working

KK