Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Show Week Ending Date

Hi all,

I am currently trying to have a chart title show the week ending date whenever a Financial Week is selected. With the data I have, I have to do this by selecting the highest day (DAY_DT) of the selected week (FINANCIAL_WEEK). The code I have written so far is:

If(GetSelectedCount(FINANCIAL_WEEK) >= 1, 'Wk Ending ' & ...

And this is where I am stuck. I have tried combinations with FirstSortedValue but nothing seems to work, and it just returns "Wk Ending " when a week is selected. Any suggestions?

1 Solution

Accepted Solutions
JonnyPoole
Employee
Employee

Is DAY_DT a date field or numerical field ?  Please share the data format. If its a date this may work:


If(GetSelectedCount(FINANCIAL_WEEK) >= 1, 'Wk Ending ' &  max(date(DAY_DT)) )


Otherwise please share the data format of the values as they appear in  a list box.

View solution in original post

4 Replies
JonnyPoole
Employee
Employee

Is DAY_DT a date field or numerical field ?  Please share the data format. If its a date this may work:


If(GetSelectedCount(FINANCIAL_WEEK) >= 1, 'Wk Ending ' &  max(date(DAY_DT)) )


Otherwise please share the data format of the values as they appear in  a list box.

Not applicable
Author

You can use Weekend() function which gives you Sunday. If you want Friday as the weekend date then you can use "date(weekend(today())-2)". Hope this helps.

Thanks

Not applicable
Author

instead of 'Wk Ending ' try Max(Day_DT)

Thanks

Suraj

Not applicable
Author

This worked perfectly. I think I was trying to get too complicated. Thanks for the quick response!