# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

New Contributor

## How to create 4 straight table charts that seperate stores into quartiles based on GP%

Can I use the dimension limitation function to create 4 seperate straight table charts ranking stores based on their GP%'s with each straight table containing 16 stores? The first table would include highed 16, next would include 17-32, the next would include 33-48, and the last would include the bottom 16.

10 Replies
Valued Contributor

## Re: How to create 4 straight table charts that seperate stores into quartiles based on GP%

if you are looking within a table you can use Class() for that

for a different table, you can use set analysis on a dimension

Esteemed Contributor

## Re: How to create 4 straight table charts that seperate stores into quartiles based on GP%

Use the rank() function:

https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/ChartFunctions/RankingFu...

Exp of use:

Table1: first 16

dimension: YourDim

Measure: sum({<YourDim={"=rank(sum({<YourDim>}YourMeasure),YourDim)<=16"}>}YourMeasure)

Table2: btwn 17-32

dimension: YourDim

Measure: sum({<YourDim={"=rank(sum({<YourDim>}YourMeasure),YourDim)>=17"}>

*

<YourDim={"=rank(sum({<YourDim>}YourMeasure),YourDim)<=17"}>

}YourMeasure)

Table3: btwn 33-48

dimension: YourDim

Measure: sum({<YourDim={"=rank(sum({<YourDim>}YourMeasure),YourDim)>=33"}>

*

<YourDim={"=rank(sum({<YourDim>}YourMeasure),YourDim)<=48"}>

}YourMeasure)

Table1: >48

dimension: YourDim

Measure: sum({<YourDim={"=rank(sum({<YourDim>}YourDim),YourDim)>48}>}YourMeasure)

New Contributor

## Re: How to create 4 straight table charts that seperate stores into quartiles based on GP%

I used the dimension limitation to calc the top 16 and then tried the following code:

sum({<A277_DEAL_LOCN={"=rank(sum({<A277_DEAL_LOCN>}A277_DEAL_LOCN),A277_DEAL_LOCN)<=16"}>}vNewFSGP%YTD)

The second table didn't return any results.

Could this be because I'm using a variable as a measure?

Esteemed Contributor

## Re: How to create 4 straight table charts that seperate stores into quartiles based on GP%

it's

sum({<A277_DEAL_LOCN={"=rank(sum({<A277_DEAL_LOCN>}vNewFSGP%YTD),A277_DEAL_LOCN)<=16"}>}vNewFSGP%YTD)

New Contributor

## Re: How to create 4 straight table charts that seperate stores into quartiles based on GP%

I've entered the code as specified but I'm not returning any data in my table.

Esteemed Contributor

New Contributor

## Re: How to create 4 straight table charts that seperate stores into quartiles based on GP%

It's not returning any data

Esteemed Contributor

## Re: How to create 4 straight table charts that seperate stores into quartiles based on GP%

It's working for me.

Can u post an image of what u've done and maybe the dimension and measures ure using?

New Contributor

## Re: How to create 4 straight table charts that seperate stores into quartiles based on GP%

could it possibly be because I am using a variable I created to calc the GP% (vNewFSGPYTD)?

would this require a different syntax?