Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to create a sheet object display only records that meet certain logical condition?

How to create a sheet object display only records that meet certain logical condition such as the Amount field is greater than zero and the description contains a certain string. Could you guide me how to do please?

1 Solution

Accepted Solutions
Not applicable
Author

Hi, basically I needed was displayed on a table only records that meet a certain condition, and what finally worked was to use a calculated dimension, as shown in the attached image.

DimensionCalculada.png

Thank you all for your contributions.

View solution in original post

13 Replies
its_anandrjs

Use the layout option of the chart or any object and use Show >> Conditional option and use expression to write there in the box

Ex:-

=If( Country = 'Germany' ,1,0) // If condition satisfy then the chart display other wise hidden like ways you can use Getfieldselection() Or =GetSelectedCount() options also by using the conditional option from the layout.

See snap for that:-

Layout.png

Hope helps you

Clever_Anjos
Employee
Employee

It depends of each sheet object you want.

Could you elaborate more your need?

Maybe posting some sample qvw

Not applicable
Author

First of all thank you very much for responding.

I'm trying to put together a Bank Reconciliation, and would like to display in a table object only those records that have the most to zero and also the description of the banking transaction amount is blank or null.

Not applicable
Author

Hi,

You can create new field in the script , in the example I'll create numeric new field and the script has to be something like that:

LOAD

........

Amount,

IF (Amount= 0 , 0, 1) as NewField

........

FROM  ABC.qvd

So now we have a new field with 0 and 1 values. Next create listbox or multibox in the layout and change the current selection.

If you want to create static charts with the values in this field, you have to create set analysis script.

Not applicable
Author

OK, but I need to combine several logical conditions and create a single resultant field based on them.

Clever_Anjos
Employee
Employee

Create a straight table

In first expression put your logical expression returning 0 or 1.

At diimension limits tab, configure to show olnly records that first expression > 0

Not applicable
Author

OK, I try and tell them.

Thank you.

Not applicable
Author

Create script,  something like that: 

LOAD

........

Amount,

IF (Amount > 0 , 0, IF(Amount > 1000, 1, IF(Amount > 4000, 2, IF( ........)))) as NewField

........

FROM  ABC.qvd


This solution has an advantage in case if you need for all application from this field.

If use this new field in only one sheet object,  you can use other options from the discusion.

If you have certain periods of Amounts in all application, you can see, also Inverval Match Function.

Regards,

Venelin

Not applicable
Author

OK, my expression would look like:

If ( Crédito > 0 , If ( IsNull(Concepto), 'Ing. pdte. reg. banco', 'Conciliado' ), If ( IsNull(Concepto), 'Egr. pdte. reg. banco', 'Conciliado' ) ) as Estado

but it is not working the evaluation of zero field, and can not find a function to evaluate if it is empty, as would be a IsEmpty () in other languages ​​for example.