Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikcheepirishe
Creator
Creator

Displaying last 5 days data in the bar chart

As attached I have data set

my basic requirement is tooo get last 5 days data for example

wanted to view data for 29/11/2017     500

                                       30/11/2017    500

                                       01/12/2017    200

                                       02/12/2017    200

                                       03/12/2017    300

                                        Total            1700/-

In bar chart last 5 days

9 Replies
Anil_Babu_Samineni

In image, There is 4 and 5th dates also should be placed right? May be Rank - chart function ‒ QlikView

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
qlikcheepirishe
Creator
Creator
Author

justification.PNG

on 29th the value is 500 and on 30th also 500  total for november month will be 1000

from 01/12/2017 it is 200 and 02/12/2017 so it should aggregate 400 in date 02/12/2017

Anil_Babu_Samineni

When you use Date field as dimension and you want to be Month aggregated, should be this?

Sum(TOTAL <Month> VALUE)

Sum(Aggr(Sum(VALUE), Month))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
devarasu07
Master II
Master II

Hi,

Try to use date range in set analysis expression

SUM({<NEWDATE = {">$(=Date(Max(NEWDATE)-5))<=$(=Date(Max(NEWDATE)))"}>}VALUE)

Fact:

LOAD Date(Date) as NEWDATE,VALUE INLINE [

    Date, VALUE

    29/11/2017, 500

    30/11/2017, 500

    1/12/2017, 200

    2/12/2017, 200

    3/12/2017, 300

    4/12/2017, 400

    5/12/2017, 500

];

Capture.JPG

qlikcheepirishe
Creator
Creator
Author

THE ABOVE CONDITION IS WORKING FINE ONE MORE REQUIREMENT

I WANT TO AGGREGATE THE TOTAL WITHOUT SELECTION

Anil_Babu_Samineni

Does it mean these?

Sum({1} TOTAL <Month> VALUE)

Sum({1} Aggr(Sum({1} VALUE), Month))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
qlikcheepirishe
Creator
Creator
Author

THE SAME CONCEPT CAN BE DONE AT BACK END devarasu07

devarasu07
Master II
Master II

Hi,

Yes, try like below,

Temp:

LOAD * INLINE [

    NEWDATE, VALUE

    29/11/2017, 500

    30/11/2017, 500

    1/12/2017, 200

    2/12/2017, 200

    3/12/2017, 300

    4/12/2017, 400

    5/12/2017, 500

];

vMax:

load max(Date(NEWDATE)) as MaxDate Resident Temp;

LET vMax = floor(Peek('MaxDate'));

LET v5DaysAgo = floor(Peek('MaxDate'))-5;

Fact:

load Date(floor(NEWDATE)) as Date1, VALUE Resident Temp where date(NEWDATE)>date('$(v5DaysAgo)') and date(NEWDATE)<=date('$(vMax)');

Drop tables vMax, Temp;

Capture.JPG

qlikcheepirishe
Creator
Creator
Author

I WANTED TO INCLUDE 29TH 30TH 1 2 3 AND DISPLAY