Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikviewforum
Creator II
Creator II

When the o/p of current expression is NULL use output of above

In the below pivot table as you see in the row=6,10 and 23 the value of the % Cust Vol is NULL. So what we prefer to have is whenever the output of the expression is NULL we would like show output of the above expression (i,e) for 6th row=81%,10th row=81% and 23rd row=78%.

Formula,
%Cust Vol= ([Cust Buy]+[Cust Sell])/([Buy]+[Sell])

Since the value of [Cust Buy],[Cust Sell],[Buy] and [Sell] is ZERO the output of 6,10 and 23 is NULL.

So can you please help me out to overcome this issue?

Buy and Sell.jpg

41 Replies
avinashelite

Did you got the answer ??

jagan
Luminary Alumni
Luminary Alumni

Try

Above(Your expression)

Refer QV help file for more details.

Regard,s

Jagan.

avinashelite

Try like this

if( len(trim (([Cust Buy]+[Cust Sell])/([Buy]+[Sell]) ))=0 or (([Cust Buy]+[Cust Sell])/([Buy]+[Sell]) )=null() , above(expression_name) , ([Cust Buy]+[Cust Sell])/([Buy]+[Sell]))

qlikviewforum
Creator II
Creator II
Author

Tried using that but didn't work out.

jagan
Luminary Alumni
Luminary Alumni

Try Before().  If possible attach some sample file.

Regards,

Jagan.

qlikviewforum
Creator II
Creator II
Author

I have tried Before but it is not working. Sorry cannot attach the document for security reasons.

qlikviewforum
Creator II
Creator II
Author

Above and Before may not work since it is a combination for 4 expressions.

([Cust Buy]+[Cust Sell])/([Buy]+[Sell]))

jagan
Luminary Alumni
Luminary Alumni

HI,

Try like this

If(Len(Trim(([Cust Buy]+[Cust Sell])/([Buy]+[Sell])))) = 0, Above(([Cust Buy]+[Cust Sell])/([Buy]+[Sell]))), ([Cust Buy]+[Cust Sell])/([Buy]+[Sell])))

REgards,

Jagan.

qlikviewforum
Creator II
Creator II
Author

Already tried that but is not working. It is giving the same result as before.

avinashelite

As a work around try like this

if( len(trim (([Cust Buy]+[Cust Sell])/([Buy]+[Sell]) ))=0 or (([Cust Buy]+[Cust Sell])/([Buy]+[Sell]) )=null(), 1 , 0)


if the value is setting properly than the issue is with the above statement

I think it because of the segmentation , Above() will not  work win this case .