Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to get the last week day value

Is that any other specific function to get the last week day value.

Assume that if today date is "20/06/2013", I need to take the value of "13/06/2013 "     45000, for this I need a expression.

  Date        Sum of Amount

03/06/2013      10000

04/06/2013      21500

05/06/2013      11000

06/06/2013      32000

07/06/2013      10200

10/06/2013      12400

11/06/2013      32500

12/06/2013      23052

13/06/2013      45000

14/06/2013      78452

17/06/2013      11859

18/06/2013      56000

19/06/2013      12000

20/06/2013      56874

21/06/2013      78000

Regards

Chriss

3 Replies
jagan
Partner - Champion III
Partner - Champion III

HI,

Try like this

=Sum({<DateDimensionName={'$(=Date(Max(DateDimensionName) - 7))'}>}Amount)

Hope this helps you.

Regards,

Jagan.

Not applicable
Author

SEE ATTACHEMENT

IN SCRIPT

LOAD *,Date(DATE#(Date,'DD/MM/YYYY'),'DD-MM-YYYY') AS DATE_NEW INLINE [

    Date, Sum of Amount

    03/06/2013, 10000

    04/06/2013, 21500

    05/06/2013, 11000

    06/06/2013, 32000

    07/06/2013, 10200

    10/06/2013, 12400

    11/06/2013, 32500

    12/06/2013, 23052

    13/06/2013, 45000

    14/06/2013, 78452

    17/06/2013, 11859

    18/06/2013, 56000

    19/06/2013, 12000

    20/06/2013, 56874

    21/06/2013, 78000

];

IN CHART--

DIMENSION = DATE_NEW

EXPRESSION ---

Sum({<DATE_NEW={'$(=DATE(Max(DATE_NEW)-7,'DD-MM-YYYY'))'}>}[Sum of Amount])

Not applicable
Author

Hi

I would add a weekday field and get the max(date) (and so on the last amount) based on the last WeekDay

best regards

chris