Skip to main content
Announcements
YOUR OPINION MATTERS! Please take the Qlik Experience survey you received via email. Survey ends June 14.
cancel
Showing results for 
Search instead for 
Did you mean: 
hkg_qlik
Creator III
Creator III

Conditional statement for a Straight table?

Hi,

Currently my data in the table is as follows:

Customer NameCreditBalanceCurrent
A$20,000.00($52,602.64)$31,478.17
B$10,000.00($45,665.92)$0.00
C$20,000.00($31,876.00)$0.00
D$25,000.00$0.00$0.00
E$150,000.00$0.00$0.00
F$10,000.00$0.00$0.00
Total$235,000.00($130,144.56)$31,478.17

--> I want ti make it look like this. (I want to get rid of all the records where Balance = 0.00 and Current = 0.00)

Let me know how can I get the below table every time based on the condition.

Customer NameCreditBalanceCurrent
A$20,000.00($52,602.64)$31,478.17
B$10,000.00($45,665.92)$0.00
C$20,000.00($31,876.00)$0.00
6 Replies
marcel_olmo
Partner Ambassador
Partner Ambassador

Hey hkgandhi, what you looking for it can be solved if you use the "edit" option in the expressions tab, and you put :

if(Balance<>0, Balance)

if( Current<>0, Current)

for both expressions, and you goona get rid of all the records where balance or current are equal 0.

Hope it helps!!

hkg_qlik
Creator III
Creator III
Author

The plan is to remove the entire row from the table if the row contains or satisfies the condition:

BALANCE = 0 and CURRENT = 0.

pover
Luminary Alumni
Luminary Alumni

In the Credit column put the expression:

if(Balance=0 and Current=0, 0, sum(Credit))

If all the expression are zero and you have the option to suppress zero values selected in the Presentation tabe then the rows will disappear.

Regards.

hkg_qlik
Creator III
Creator III
Author

Thanks for the reply .

But its not working for me.

pover
Luminary Alumni
Luminary Alumni

What's not working? The function returns null or the rows don't disappear? It is is a problem with the function, post it. If the rows don't disappear try turning everything to null().

Regards.

marcel_olmo
Partner Ambassador
Partner Ambassador

Karl is right, it should work for you. Maybe you've something wrong in your "if" function.

Cheers!!