Announcements
Applications are open for the 2024 Qlik Luminary Program. Apply by December 15 here.
cancel
Showing results for
Did you mean:
Creator II

## Identify the most famous pattern

Good morning,

i've got this kind of data.

USER, AREA, TIME, DATE,

1,KITCHEN, 9,06/30/2023,

1, TOILET, 10,06/30/2023,

1, GARDEN, 11,06/30/2023,

2, TOILET, 9,06/30/2023,

2, KITCHEN, 10,06/30/2023,

3,KITCHEN, 9,06/30/2023,

3, TOILET, 10,06/30/2023,

3, GARDEN, 11,06/30/2023

];

I would like to have the most famous route...

for example --> route --> Kitchen, toilet, garden

Labels (3)

• ### Script

1 Solution

Accepted Solutions
MVP

Hi,

maybe one solution to identify the most frequent area sequence could be :

``````table1:
AREA,
Time#(TIME,'hh')							as TIME,
Date#(DATE,'MM/DD/YYYY')					as DATE,
Timestamp#(DATE&' '&TIME,'MM/DD/YYYY hh')	as DATETIME
INLINE [
USER, AREA, TIME, DATE
1, KITCHEN, 9,06/30/2023
1, TOILET, 10,06/30/2023
1, GARDEN, 11,06/30/2023
2, TOILET,  9,06/30/2023
2, KITCHEN,10,06/30/2023
3, KITCHEN, 9,06/30/2023
3, TOILET, 10,06/30/2023
3, GARDEN, 11,06/30/2023
4, TOILET, 10,06/29/2023
4, GARDEN, 11,06/29/2023
4, KITCHEN,12,06/29/2023
];``````

3 Replies
Partner - Creator II

We could use Pow function to derive famous pattern

Famous Pattern Formula:-Pow(2,sum(total<USER> aggr(distinct count(AREA),USER)))

Pattern Recognition in QlikView - Qlik Community - 807303

Creator II
Author

Thanks but it's a little bit different...

I would like to get the most famous pattern in the same order.

So, for example, one user could go into kitchen, toilet and garden but in a different order. this would be another different pattern....

MVP

Hi,

maybe one solution to identify the most frequent area sequence could be :

``````table1:
AREA,
Time#(TIME,'hh')							as TIME,
Date#(DATE,'MM/DD/YYYY')					as DATE,
Timestamp#(DATE&' '&TIME,'MM/DD/YYYY hh')	as DATETIME
INLINE [
USER, AREA, TIME, DATE
1, KITCHEN, 9,06/30/2023
1, TOILET, 10,06/30/2023
1, GARDEN, 11,06/30/2023
2, TOILET,  9,06/30/2023
2, KITCHEN,10,06/30/2023
3, KITCHEN, 9,06/30/2023
3, TOILET, 10,06/30/2023
3, GARDEN, 11,06/30/2023
4, TOILET, 10,06/29/2023
4, GARDEN, 11,06/29/2023
4, KITCHEN,12,06/29/2023
];``````

Tags
Community Browser