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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How not to include dimension in table when it equals a certain value

Hi Community,  I have a calculated dimesion that equals -1 and 0.  When its 0 I don't want it in my table and don't want it to contribute to the sum.  Any thoughts?

1 Solution

Accepted Solutions
vincent_ardiet
Specialist
Specialist

Hi,

You can use a set analysis, for example :

=sum({$<MyDimension={'-1'}>} Qty)

This formula will only take in account Qty when MyDimension=-1

Of course MyDimension must be calculated in the script.

Else, if the dimension is calculated in the chart, instead of returning 0, you can use null() and then choose to supress null value with the checkbox below the dimension.

Regards,

Vincent

View solution in original post

5 Replies
Not applicable
Author

Can you attach a sample .qvw so we can help you.

Thanks.

Regards.-

vincent_ardiet
Specialist
Specialist

Hi,

You can use a set analysis, for example :

=sum({$<MyDimension={'-1'}>} Qty)

This formula will only take in account Qty when MyDimension=-1

Of course MyDimension must be calculated in the script.

Else, if the dimension is calculated in the chart, instead of returning 0, you can use null() and then choose to supress null value with the checkbox below the dimension.

Regards,

Vincent

chematos
Specialist II
Specialist II

Hi, with the permission of Vincent and using his example, you could use the operator '-=' to get all values except the value or values you want to choose.

=sum({$<MyDimension -= {0}>} Qty)

Although may be you are looking for an if statement:

If(CalculateDimension <>0, Dimension)

Regards,

Chema


CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Can you post the expression you used for calculated dimension?

Celambarasan

Not applicable
Author

I would but I actually used it in my script load.  I could give you that instead:

if(leafhdrtxt='AERO' and el1='2000',PeriodTotal,if(leafhdrtxt='INCOME TAXES' and el1='2000',PeriodTotal,if(leafhdrtxt='OTHER INCOME (EXPENSE)' and el1='2000',PeriodTotal,if(leafhdrtxt='NON CONT INTEREST' and el1='2000',PeriodTotal,if(leafhdrtxt='Administrative expense' and el1='2000',PeriodTotal,if(leafhdrtxt='EFD' and el1='1000',PeriodTotal,if(leafhdrtxt='ESD' and el1='4000',PeriodTotal,if(leafhdrtxt='ATD' and el1='4700',PeriodTotal,if(leafhdrtxt='INCOME TAXES' and el1='4700',PeriodTotal,if(leafhdrtxt='OTHER INCOME (EXPENSE)' and el1='4700',PeriodTotal,if(leafhdrtxt='ELIM' and el1='9900',PeriodTotal,if(leafhdrtxt='INCOME TAXES' and el1='9900',PeriodTotal,if(leafhdrtxt='Administrative expense' and el1='9000',PeriodTotal,if(leafhdrtxt='INCOME TAXES' and el1='9000',PeriodTotal,if(leafhdrtxt='OTHER INCOME (EXPENSE)' and el1='9000',PeriodTotal))))))))))))))) as t,