Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

dimension expression using variable

Hi!

I have a variable called vSurplus with this definition

if(ProductSpec = 'DN' or ProductSpec = 'MP' or ProductSpec = 'X' or ProductSpec = 'CL',  ProductLevel-max(ProductDemand*3,ProductMinLevel) ,ProductLevel-max(ProductDemand*3,ProductOrderPt) )

So I have a column expression Surplus with this (ProductAvgCost/ProductPerUnit)* $(vSurplus) (works fine)

I am trying to set the first dimension product acording to this : if ( (ProductAvgCost/ProductPerUnit)* $(vSurplus) >0 and ProductSpec<>'O', Product )

So this way I can supress null value ...

But that does not work ... I always have nothing selected ... Maybe I am not using my variable the good way?

1 Solution

Accepted Solutions
sunny_talwar

In that case you will need a Aggr() function as calculated dimensions with aggregation functions require you to use Aggr()

Calculated Dimensions

View solution in original post

4 Replies
sunny_talwar

Is this the name of the field?

ProductLevel-max(ProductDemand*3,ProductMinLevel)

ProductLevel-max(ProductDemand*3,ProductOrderPt)

Or is this some kind of calculation?

Anonymous
Not applicable
Author

A calculation ...

ProductLevel, ProductDemand , ProductMinLevel , ProductOrderPt are fields


max is a function

sunny_talwar

In that case you will need a Aggr() function as calculated dimensions with aggregation functions require you to use Aggr()

Calculated Dimensions

Anonymous
Not applicable
Author

Thanks ... Reading and experimenting with aggr... will come back if I can't figure it out ...