4 Replies Latest reply: Nov 5, 2015 4:36 AM by Rudolf Linder

# Formula in text box

Hi, QV community

I have one problem that needs solving.

I have data for the sale of my company for every day.

I wanted to make a big text box that says "Sales in  & last(YrWk)

But my problem is of course that the date is always changing so I have to make a formula in my text box

Let me explain this better:

So today is the date 5.11.2015 so that makes it week 45 in the year 2015 or 2015-Wk45 in my data.

So last week was 2015-Wk44.

So I need a formula in the text box that says Sales in 2015-Wk44

regards Darri

• ###### Re: Formula in text box

you can use predefiend function weekname (instead of "-" uses "/"

='Sales in ' & WeekName(today()-7)

• ###### Re: Formula in text box

That is what I am looking for but I would like to have 2015-Wk44 so the users knows exactly what I the data is showing.

I feel like 2015/44 not explain good enough that it is week 44.

You have any idea to show Wk44

• ###### Re: Formula in text box

use

='Sales in ' & Year(Today())&'-Wk'&(Week(Today())-1)

the function tresesco suggested (but only get text instead of sum)

• ###### Re: Formula in text box

Try like:

=Sum({<YrWk={"\$(=Year(Today())&'-Wk'&(Week(Today())-1))"}>}Sales)