Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey Guys,
I am having a Dimension with multiple expression in qliksense..
How can I restrict those dimensions where expression value is '0'??
I don't want using properties like Add-on - > Data Handling - > Uncheck 'Include Zero Values'....
I want at dimension or expression level itself..
Pls suggest.
Regards,
BA
Hi Balraj
Try using if condition.
IF("yourExpression"=0,null(),"YourExpression")
Hide null values.
Many Thanks
Karthik
any other options possible as I am multiple if condition at expression level....can we do it at Dimension level?
Is it possible during data load to set a flag on the dimension either in the script or data transformation stage.. That will simplify the calculated dimension suggested by karthik
You can do this in the script level or create a master dimension:
=aggr(if(sum(YourMeasure)=0,Null(),YourDim),YourDim)
And use this newly crated dimension in ur chart
Omar,
I already tried this...but in my case I am having 4-5 different measures for 4-5 expressions...
How to use those 4-5 measures to create a master dimension??
slightly unrelated however, can you elaborate what does this function do - list down dimensional values for non-zero values of the measure involved i.e a non-zero master dim?
=aggr(if(sum(YourMeasure)=0,Null(),YourDim),YourDim)
u want to hide all dimensions where all the 5 measures are 0?
To translate it in human words:
a dimension is a list of values; and we want to show only values where there is sum of YourMeasure >0
so
if YourMeasure =0 in the dimension value,do not show it (null()) else, show the values where there is a measure:
to break it:
this is the condtion!
if(sum(YouMeasure)=0,null(),YourDimension)
Note: since, by default, Qlik won't show null() values in a filter box, all of these newly created null() values won't be shown in our master dimension.
But till now, we want to create a dimension; and we're using a measure (sum(YourMeasure) without aggregating it to the dimension it self; in fact, we want to see this condition on the YourDimension level.
so we waggregate with the concerned dimension:
=> final dim will be :
=aggr(if(sum(YourMeasure)=0,Null(),YourDim),YourDim)
or
=if(aggr(sum(YourMeasure),YourDim)=0,Null(),YourDim)