Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor

Filtering particular values in a dimension - pivot Table

Hi all,

I am having a criteria to filter the zone 1 only in my pivot table from zone dimension.I attached the excel sheet data and expected output for the same.Can anyone suggest the way to complete it.

Input table for the pivot table:

error loading image

Expected pivot table output:

error loading image

3 Replies
Highlighted
MVP
MVP

Filtering particular values in a dimension - pivot Table

So you want the pivot table to show only Zone 1? Perhaps use a calculated dimension and suppress when null?

if(Zone='Zone 1',Zone)

Highlighted
Partner
Partner

Filtering particular values in a dimension - pivot Table

Or if your expressions allows move the if statement inside the expression rather then making a calculated expression (better performance as John earlier stated in another post).

F.ex. If your expression is sum(Revenue) make sum(if(Zone='Zone 1',Revenue,null()) and supress null on Zone dimension.

An ever better solution is to move the if statement to the script.

Highlighted
MVP
MVP

Filtering particular values in a dimension - pivot Table

Good points. I think you're right that the best solution is to move it into the script. In the same table that has the Zone field, add a new field:

if(Zone='Zone 1',Zone) as "Zone 1",

Then use "Zone 1" as your dimension instead of Zone, and suppress null values.