Good morning,
i've got this kind of data.
LOAD * 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
];
I would like to have the most famous route...
for example --> route --> Kitchen, toilet, garden
Hi,
maybe one solution to identify the most frequent area sequence could be :
table1:
LOAD USER,
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
];
We could use Pow function to derive famous pattern
Famous Pattern Formula:-Pow(2,sum(total<USER> aggr(distinct count(AREA),USER)))
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....
Hi,
maybe one solution to identify the most frequent area sequence could be :
table1:
LOAD USER,
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
];