# New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
New Contributor

## Dynamic Dimension depending on Calculation

Dear All,

can you help me with a question regarding restricting a dimension by using dynamic dimension?

• By using the formula "=if(FIELD='X' and FIELD='Z', FIELD, Null())" as dynamic dimension and activating the option "Omit NULL-Values", it is very easy to restrict the dimension to the values 'X' and 'Z' (FIELD={X,Y,Z}).

My problem is, how do I restrict the dimension when it depends on a calculation? For example,

• By using a formula like "=if(count(ClientIDs)>0, FIELD, Null())".
• For instance, value 'X' has 20 ClientIDs, value 'Y' has 0 IDs and value 'Z' has 10 IDs.
• I need a formula, that restricts my dimension to value X and Z (in the example) cause of the number of ClientIDs >0.

Is this possible with dynamic dimension?

Thanks to all

Labels (2)

• ### dynamic dimension

1 Solution

Accepted Solutions
New Contributor III

## Re: Dynamic Dimension depending on Calculation

I think you can use the AGGR function in this case.

if(aggr(nodistinct count(ID),Field)>0,Field,Null())

2 Replies
New Contributor III

## Re: Dynamic Dimension depending on Calculation

I think you can use the AGGR function in this case.

if(aggr(nodistinct count(ID),Field)>0,Field,Null())

New Contributor

## Re: Dynamic Dimension depending on Calculation

it works, perfect 🙂 Thank you very much!