Hi guys,
i am new here, but i was hoping you could help me. I have a Database dating back to 2014, it contains a calendar week field and a time stamp which is basically the just the Date the sale has been made.
My problem now is, I have to make a query which contains Data from the last 10 weeks. so for example, i refresh in CW 24 would mean i need data from CW14 to CW 23. And a little added problem, i need this to be dynamic so if refreshed in CW 25 data should be from CW 15 to CW 24, and so on and so forth.
I tried to do this on my own but it didn't go anywhere.
Here is my try:
Between Year([Timestamp])* 53 + DatePart("ww"; [Timestamp]) = Year(Date())* 53 + DatePart("ww"; Datum())-10 and Year([Timestamp])* 53 + DatePart("ww"; [Timestamp]) = Year(Datum())* 53 + DatePart("ww"; Date())-1
The Syntax was ok, but it just doesn't display any Values.
So i was really hoping someone could help me.
I hope i was clear enough so one can understand what i mean. Thanks in advance, any help is appreciated.
BR
i am new here, but i was hoping you could help me. I have a Database dating back to 2014, it contains a calendar week field and a time stamp which is basically the just the Date the sale has been made.
My problem now is, I have to make a query which contains Data from the last 10 weeks. so for example, i refresh in CW 24 would mean i need data from CW14 to CW 23. And a little added problem, i need this to be dynamic so if refreshed in CW 25 data should be from CW 15 to CW 24, and so on and so forth.
I tried to do this on my own but it didn't go anywhere.
Here is my try:
Between Year([Timestamp])* 53 + DatePart("ww"; [Timestamp]) = Year(Date())* 53 + DatePart("ww"; Datum())-10 and Year([Timestamp])* 53 + DatePart("ww"; [Timestamp]) = Year(Datum())* 53 + DatePart("ww"; Date())-1
The Syntax was ok, but it just doesn't display any Values.
So i was really hoping someone could help me.
I hope i was clear enough so one can understand what i mean. Thanks in advance, any help is appreciated.
BR