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: 
wuming79
Creator
Creator

How to do proper Groupby in Qlik Sense Table?

Hi,

Is there a documentation on how to do the following groupby?

NameFruitDate
MikeApple20180101
MikeApple20180103
JohnBanana20180201
JohnBanana20180209

I wanted to create another table that shows the earliest date Mike and John bought fruits.


Name

FruitEarliest Date
MikeApple20180101
JohnBanana20180201
1 Solution

Accepted Solutions
weijietc
Partner - Contributor III
Partner - Contributor III

Table1:

LOAD * INLINE [

    Name, Fruit, Date

    Mike, Apple, 20180101

    Mike, Apple, 20180103

    John, Banana, 20180201

    John, Banana, 20180209

];


qualify *;

Table2:

Load Name,

Fruit,

Min(Date) as [Earliest Date]

resident Table1

Group by Name, Fruit; 

View solution in original post

9 Replies
weijietc
Partner - Contributor III
Partner - Contributor III

Table1:

LOAD * INLINE [

    Name, Fruit, Date

    Mike, Apple, 20180101

    Mike, Apple, 20180103

    John, Banana, 20180201

    John, Banana, 20180209

];


qualify *;

Table2:

Load Name,

Fruit,

Min(Date) as [Earliest Date]

resident Table1

Group by Name, Fruit; 

wuming79
Creator
Creator
Author

Can I do this after I loaded the data?

Ivan_Bozov
Luminary
Luminary

The front end alternative is AGGR().

AGGR(MIN(Date), Name, Fruit)

vizmind.eu
tomasz_tru
Specialist
Specialist

Just use Min(Date) as a measure in the visualization

Tomasz

weijietc
Partner - Contributor III
Partner - Contributor III

You can do it in edit script or in chart

wuming79
Creator
Creator
Author

sorry, how do I view this quick? I tried using Qlik Sense -> Data manager -> Data connections -> attachedFiles but Qlik Sense will have an error, "Unable to upload file "Fruits.qvw". This file type is not supported.

weijietc
Partner - Contributor III
Partner - Contributor III

Use this

wuming79
Creator
Creator
Author

Hi, qvf is also not supported in Qlik Sense Enterprise.

weijietc
Partner - Contributor III
Partner - Contributor III

do you have access to qmc? import the app