Skip to main content
Announcements
Save $600 on Qlik Connect registration! Sign up by Dec. 6 to get an extra $100 off with code CYBERSAVE: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
ngosz4074
Contributor III
Contributor III

Grouping rows

Hello,

I'm trying to group a series of rows and tried using which I thought should be fairly simple in the attachment.

Table

ID

max(4 Week Pct Value),

max(8 Week Pct Value),

max(12 Week Pct Value)

Group by ID;

But in the grouping, I get 3 rows back instead of 1.  I am looking into the underlying data for the long term solution, but in the short-term is there something I can do in the script or an expression to group the data together into one row?

I also tried using the peek() function looking at the Previous ID.

Thanks in advance

11 Replies
ngosz4074
Contributor III
Contributor III
Author

I have seen it via Pivot table.

qliksus
Specialist II
Specialist II

The below script seems to give your required result not sure what issue you are facing

LOAD Distinct ID,

     Name,

     MaxString([4 Week Flag]) as [4 Week Flag],  

     MaxString([8 Week Flag]) as [8 Week Flag],    

     MaxString([12 Week Flag]) as [12 Week Flag]

   

FROM

[\Example.xlsx]

(ooxml, embedded labels, header is 1 lines, table is Sheet1)

Group by ID,Name;