Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Separate Values

Hi,

 

I'm working with a database and one column has three values 'A - 00000', 'F - 00000' and 'NC - 00000', I need separate each value to the others, it´s possible separate with tFilterRow or need other element to do it?.

 

Regards.

 

Labels (3)
2 Replies
akumar2301
Specialist II
Specialist II

If number of districts value is known and pre-sefine

You could you tmap and create 3 output for each diff value.
Anonymous
Not applicable
Author

Hi @AngelTrejo1208 ,

 

This is possible in both static and dynamic way.

 

If you have definite number of distinct value you can create those many flows from tMap and separate the flows using expression filters.

 

If number of distinct value is not known, please follow the below steps:

 

1. get the distinct value from the database as "select distinct colname from tabname"

2. connect tFlowToIterate to the DB output.

3. In tFlowToIterate -> iterate output -> connect the same DB again with full query like "select * from tabname where colname = '"+((String)globalMap.get("yourtFlowToIterateKey"))+"'"

4. This Output can be put into a file and each file name can have the suffix of your tFlowToIterateKey as <FileName>_"+((String)globalMap.get("yourtFlowToIterateKey"))+".txt

 

This way you can dynamically split into as many files as there are number of distinct value for your column.

 

Thanks and Regards,

Subhadip