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: 
edwin
Master II
Master II

Collapsible rows in straight table similar to pivot

this is more to share what weve done in case someone else had the same requirement and also hoping someone else has a more elegant solution (aside from use of extensions)

the requirement we were presented was to show collapsible rows showing summaries and allowing the user the capability to expand those rows.  pretty much like a pivot table except all the dimensions are in a single column.  This is basically a visualization exercise as the users dont like the way space is wasted with pivot tables:

<table><tr><td>Dimension</td><td>Measure</td></tr>
<tr><td>+   Header1</td><td>100</td></tr>
<tr><td>+   Header2</td><td>150</td></tr>
</table>

when the user clicks on HEADER1, it expands and shows the corresponding components:

<table><tr><td>Dimension</td><td>Measure</td></tr>
<tr><td>-   Header1</td><td>100</td></tr>
<tr><td>         Detail1</td><td>20</td></tr>
<tr><td>         Detail2</td><td>80</td></tr>
<tr><td>+   Header2</td><td>150</td></tr>
</table>

the solution requires triggers to capture what the user has clicked and save that value in a list of values that are expanded.  clicking again removes from the list of expanded values.   of course the filtered field is cleared to allow the straight table to show all values.

ive attached a sample QVW with the variables used and the triggers.

if you have suggestions to improve on it (esp a solution not using triggers and not using extensions) pls share.  Note we built an extension that does all of these but our org frowns upon extensions

edwin

 

3 Replies
Kushal_Chawda

Is there any specific reason to do this way in straight table?

edwin
Master II
Master II
Author

as i said, it was a visualization exercise as the pivot table took up a lot of space, this way we can incorporate multiple columns into one and the only overhead was the spacing added per level of the hierarchy.  whereas in pivot, we will use multiple columns and each column will need to be compressed.

edwin
Master II
Master II
Author

also i thought it was an elegant alternative to a pivot table.