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

Set Action for my calculated Date field

Hi Experts - Quick clarification..

I have a Month field in my DB and my calculated expression is like below..

=if((right(Date(if(YDAY=Aggr( NODISTINCT Max(YDAY),Month_Name, Year_Name),YDAY),'MM/DD/YYYY'),4) &

     LEFT(Date(if(YDAY=Aggr( NODISTINCT Max(YDAY),Month_Name, Year_Name),YDAY),'MM/DD/YYYY'),2)) = CALENDAR_YEAR_MONTH_CD,

MonthName((if(YDAY=Aggr( NODISTINCT Max(YDAY),Month_Name, Year_Name),YDAY))))

Now my requirement is ...when i open the Document i need the maximum month to be selected by default.. Since it is a calculated expression, am finding difficult to set an action for this.. Any idea ? how to get this done ?

9 Replies
techvarun
Specialist II
Specialist II

is it possible to share a sample app?

Thanks

Varun

tresesco
MVP
MVP

Could you post a sample? I guess if you have a dual month field, you can just use trigger to select the max of that month field and should work.

Moreover, the expression you are using seems to be one not very optimistic. Perhaps a better performant and easy expression would be there.

Gysbert_Wassenaar

It looks like you could select the maximum value in the YDAY field instead.

If that doesn't give the result you want then I'd try to create a field in the script for the calculated date field instead of trying to use a calculated dimension.


talk is cheap, supply exceeds demand
bharani8
Creator III
Creator III
Author

Hi In the attached qvw file.... i need the below requirements...

1) When i select the month, last date of the month alone should get selected... And that last date will be the value for whole month..

2) When i open the document.. By default the max(YDAY) should be selected..

bharani8
Creator III
Creator III
Author

Plz refer above reply msg (To Varun's)

bharani8
Creator III
Creator III
Author

Plz refer above reply msg (To Varun's)

tresesco
MVP
MVP

Like in attached sample?

Field: YDAY

Search string: =Date(Max(YDAY))

bharani8
Creator III
Creator III
Author

Hi  - In ur qvw file.. I need the Sep to be selected and under sep.. max(YDAY)...

tresesco
MVP
MVP

Add one more trigger. PFA