Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

no zero-values in Formula

Hello everybody,

I have a topic unfortunately with very much additional work in Excel for me. Maybe some of you can help me.

I have a table with values and then two additional red columns that calculate the difference between these two black columns

(one with positive amount, one with negative, but the value is the same, always).

Now I want to adapt that report.

Only the lines <> 0 in the red columns should appear. I know how to show only lines with value <> 0

But how can I only show lines with calculated result <> 0?

hc_019.jpg

Tags (3)
9 Replies
bbi_mba_76
Valued Contributor

Re: no zero-values in Formula

Hi,

you could use an expression like this

if((column(1)-column(2))<>0, (column(1)-column(2)) )

or forcing a value in the else

if((column(1)-column(2))<>0, (column(1)-column(2)), '' )

MVP & Luminary
MVP & Luminary

Re: no zero-values in Formula

You'll have to add the condition to all the expressions in your pivot table.


talk is cheap, supply exceeds demand
Not applicable

Re: no zero-values in Formula

Hi,

Let expr= Your Calculation.

In expression of Your Chart, Give the condition as

if(expr>0,expr).

Then Go to Object Properties--> Check Suppress Zero-Values

Regards,

Joshmi

borisman
Contributor III

Re: no zero-values in Formula

i think this is the only way unfortunately. but you do not want to hard code your condition though - i would create a hidden column with your condition expression which will evaluate to 1 or 0 and then use it for all your other expressions.

if (colHiddenExp > 1 , exp1)

..

if (colHiddenExp > 1 , expn)

Not applicable

Re: no zero-values in Formula


Does anybody know, if it is possible via set analysis.

This would be a solution that is easier for me

At the moment the formular is:

 

[IFRS AfA Per] - [HGB AfA Per]

Not applicable

Re: no zero-values in Formula

Hi,

thanks for you suggestions. I will try them and come back.

But does anyone know about a solution directly in the formular (without additional columns)?


bbi_mba_76
Valued Contributor

Re: no zero-values in Formula

Sorry, but

if(([IFRS AfA Per] - [HGB AfA Per] )<>0, ([IFRS AfA Per] - [HGB AfA Per] ) )

is not working?

You have to do that for each expression as said by

Not applicable

Re: no zero-values in Formula

Hi Michele,

it works partially. Now the lines which have values are shown with values. The other dont show a value.

But the tricky challenge for me is that the empty lines are not shown anymore.

(From that Screenshot only the two lines with -3560,92 and 399,05 should stay in that pivot)

hc_022.jpg

Thanks

Highlighted
bbi_mba_76
Valued Contributor

Re: no zero-values in Formula

but you have to add the if in each expression, also for the first two columns:

if(([IFRS AfA Per] - [HGB AfA Per] )<>0, [IFRS AfA Per])

if(([IFRS AfA Per] - [HGB AfA Per] )<>0, [HGB AfA Per])