Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
shekhar_analyti
Specialist
Specialist

How to separate data into happened , On the day and Upcoming and then finding Top performer each day ?

Hi All ,

How to separate data into happened(past) , On the day(current) and Upcoming(future) programs  and then finding Top performer each day ?

Please find attached data for the reference .

Thanks & Regrds

Shekar

14 Replies
YoussefBelloum
Champion
Champion

EDITED

Hi,

one way to do this :

if Current for you "on the day" is today for example, you can do this on the script

Table:

LOAD

.

.

if(Date<today(),'Happened',if(Date>today(),'Upcoming','current') as Flag

From...

you can use your flag on your expression with IF statements or Set analysis.

But this method is correct only if you relaod your app everyday.

otherwise I suggest you to compare your Date field with today() on the front end.

hope it is clear

shekhar_analyti
Specialist
Specialist
Author

Hi Youssef ,

Thanks for the reply . Actually i was looking more into solution around


" finding Top performer each day"  . Please reffer the attached.

YoussefBelloum
Champion
Champion

Ok, top customer compared to which measure ? Amount ?

shekhar_analyti
Specialist
Specialist
Author

Yes .. Amount

YoussefBelloum
Champion
Champion

I removed all the lined where you have null values on date:

you can try this:

touch:

LOAD

    Sales_Person,

    Date,

    if(Date<today(),'Happened',if(Date>today(),'Upcoming','current')) as Flag, //this is for the flag

    Amount

FROM

Touch data.xlsx

touch2:

LOAD *,

AutoNumber(Amount, Flag) as Rank //and this is for the Rank depending on the Flag Thanks stalwar1

Resident touch

Where not IsNull(Amount)

Order by Amount;

DROP Table touch;

touch.png

shekhar_analyti
Specialist
Specialist
Author

Hi Yossef ,

Thanks for the help . I am still not sure to get the data represented in the way i have shown in attached excel .

Can we get it way like below , if yes share me QVW

pivot.png

shekhar_analyti
Specialist
Specialist
Author

Hi Sunny Bhai .. can we get like above pivoting ? stalwar1

YoussefBelloum
Champion
Champion

Hi Shekar,

I don't think you can represent your data like this... at least you have your ranking now. maybe you should play a little bit with Pivot table.

shekhar_analyti
Specialist
Specialist
Author

Thank You Youssef ,

Can we at least represent above same data without  top performer and Flag value .

I just wanted date to be top pivoted