Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Restrict Dimension with '0' value in qliksense

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

8 Replies
karthikoffi27se
Creator III
Creator III

Hi Balraj

Try using if condition.

IF("yourExpression"=0,null(),"YourExpression")

Hide null values.

Many Thanks

Karthik

Anonymous
Not applicable
Author

any other options possible as I am multiple if condition at expression level....can we do it at Dimension level?

ogster1974
Partner - Master II
Partner - Master II

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

OmarBenSalem
Partner - Champion II
Partner - Champion II

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

Anonymous
Not applicable
Author

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??

AlipNath
Creator II
Creator II

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)

- Eager to learn n grow,

Olip
OmarBenSalem
Partner - Champion II
Partner - Champion II

u want to hide all dimensions where all the 5 measures are 0?

OmarBenSalem
Partner - Champion II
Partner - Champion II

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)