Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

rammuthiah
Contributor II

Find Previous Date upto 5 days

Need logic to find sheet 2 Date given in below sample data

Date find.JPG

1 Solution

Accepted Solutions
pradosh_thakur
Valued Contributor III

Re: Find Previous Date upto 5 days

could you be more specific

something like

if([Sheet 1 Date]-[Sheet 2 Date]=5,[Sheet 2 Date],null())   ????


regards

Pradosh

2 Replies
pradosh_thakur
Valued Contributor III

Re: Find Previous Date upto 5 days

could you be more specific

something like

if([Sheet 1 Date]-[Sheet 2 Date]=5,[Sheet 2 Date],null())   ????


regards

Pradosh

Khan_Mohammed
Honored Contributor II

Re: Find Previous Date upto 5 days

Day-5 would give you 5 days back.

In script use

day([Sheet 1 Date]) as Sheet1Day,

day([Sheet 2 Date]) as Sheet2Day,

In expression use

sum({<Sheet1Day=  {$(=(Sheet1Day)-5)}>}(Sheet1Day))

Not sure if the expression is correct but it would give me the values against day selected.

Community Browser