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

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

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

use

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

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

View solution in original post

4 Replies
Anonymous
Not applicable
Author

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

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

tresesco
MVP
MVP

Try like:

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

Anonymous
Not applicable
Author

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

Anonymous
Not applicable
Author

use

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

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