Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

i have dates like ?

hi i have  2 fields

date and sales

date:

1/1/2015

2/1/2015,

3/1/2015,

4/1/2015

5/1/2015

6/1/2015

7/1/2015

8/1/2015

9/1/2015

10/1/2015

11/1/2015

12/1/2015

13/1/2015

14/1/2015

15/1/2015

.

.

.

.

30/1/2015

31/1/2015

and sales is for every date like 100,200,300......30000

now my req is for example if select on any one date like  14/1/2015 is wednesday .

if i select on  14/1/2015 means then i want see the sales for only   14/1/2015(wed)  and exactly previous week wednesday means (7/1/2015)

it means i want see sales for only selected date and from selected date to exactly one week back to that date

so in the same way if i select  15/1/2015 theni want see salesfor  15/1/2015 and 8/1/2015(even i dont want see data between dates of 15/1/2015 and 8/1/2015) i want see for only   15/1/2015 and  8/1/2015.

i hope u guys understand the question

3 Replies
PrashantSangle

Hi,

create 2 expression

1st : Sum({<date={"$(=date(max(date)))"}>}Sales)

2nd : Sum({<date={"$(=date(max(date)-7))"}>}Sales)

Note: Carefull with date Format.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Have a look at the applications.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
sasiparupudi1
Master III
Master III

SET DateFormat='DD/MM/YYYY';

in the script header and in the chart,create an expression as below


Sum({<SalesDate={"$(=date(only(SalesDate)-7))"}>}SalesAmount)

Hope this helps