Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Flipping between views

I have a table with duplicates. I would like to build something where if the users select "all", Qlikview will show them all the data and if they select "unique", it shows them only the unique data. How would I go about building something like this?

2 Replies
johnw
Champion III
Champion III

Maybe like this.

LEFT JOIN ([Main Table])
LOAD
[Key]
,if(count([Key])=1,'Y','N') as [Unique?]
RESIDENT [Main Table]
GROUP BY [Key]
;

[Views]:
LOAD * INLINE [
View, Unique?
All,Y
All,N
Unique,Y
];

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

To show all rows in a TableBox or Straight Table, you must have some underlying unique value column you can use as a Dimension in the table. So toggling between showing all rows and consolidating duplicates is a matter of toggling the inclusion of the unique column on/off.

Take a look at this sample for an example:

Qlikview Cookbook: Tutorial - About Column Visibility http://qlikviewcookbook.com/recipes/download-info/tutorial-about-column-visibility/

Specifically, the Pivot table on the "Conditional (Dynamic) Columns" sheet where the unique OrderId is toggled on and off.

-Rob

http://masterssummit.com

http://qlikviewcookbook.com