Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a data that is not structured. I want to create a fixed list of terms that will search the value in different fields.
For exemple, the list is based in key words of fruits (apple, banana and orange). So, when I select one of these fruits, it will search the columns [column A] [column B] [column C]. If they have any value that correspond to it, it will be filtered in.
Column A is not structured at all. It is a summary, so, it will have complete phrases, like. "I like banana".
And if the filter finds the value on any of the 3 columns, it should filter in.
There are multiple ways to solve this problem. I believe you are looking for something more controlled so maybe you can use Button Actions to do that.
So, here is my Load Script. I'm loading data from the Snowflake sample database and a custom list of Terms. Those terms will be used in our search:
LIB CONNECT TO [SnowFlakeSample];
[CUSTOMER]:
SELECT "C_CUSTKEY",
"C_NAME",
"C_ADDRESS",
"C_NATIONKEY",
"C_PHONE",
"C_ACCTBAL",
"C_MKTSEGMENT",
"C_COMMENT"
FROM "SNOWFLAKE_SAMPLE_DATA"."TPCH_SF1"."CUSTOMER";
FilterTerms:
LOAD * INLINE [
Term
nod
regular
beans
BUILDING
];
And this is the user interface:
The button has two actions, one search for each field that I want to search the selected value - in your case will be three:
This is the action configuration:
This is the Value expression:
='*' & MaxString(Term) & '*'
I setup it to get the latest value in alphabetical order available in the Term field (that is why the MaxString).
You can manipulate it to support multiple Terms using some concatenate function.
If you select beans in Term and click on Search button, it will filter the values on column C_COMMENT or C_MKTSEGMENT:
Try using the smart search for this
There are multiple ways to solve this problem. I believe you are looking for something more controlled so maybe you can use Button Actions to do that.
So, here is my Load Script. I'm loading data from the Snowflake sample database and a custom list of Terms. Those terms will be used in our search:
LIB CONNECT TO [SnowFlakeSample];
[CUSTOMER]:
SELECT "C_CUSTKEY",
"C_NAME",
"C_ADDRESS",
"C_NATIONKEY",
"C_PHONE",
"C_ACCTBAL",
"C_MKTSEGMENT",
"C_COMMENT"
FROM "SNOWFLAKE_SAMPLE_DATA"."TPCH_SF1"."CUSTOMER";
FilterTerms:
LOAD * INLINE [
Term
nod
regular
beans
BUILDING
];
And this is the user interface:
The button has two actions, one search for each field that I want to search the selected value - in your case will be three:
This is the action configuration:
This is the Value expression:
='*' & MaxString(Term) & '*'
I setup it to get the latest value in alphabetical order available in the Term field (that is why the MaxString).
You can manipulate it to support multiple Terms using some concatenate function.
If you select beans in Term and click on Search button, it will filter the values on column C_COMMENT or C_MKTSEGMENT:
That was what i was looking for. Do you know how can i do that concatenate function? I'm new to qlik sense and I'm having some trouble doing it.