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: 
datanibbler
Champion
Champion

How to identify a record with an *?

Hi,

I need to look for records in an Excel_list containing the * - in those records, the providers just meant that the value of the field should be the same as in the record above, so there is just a *

<=> but the star is recognized by QlikView as a Wildcard, isn't it?

So how can I tell QlikView to look for records where there is the *?

Thanks a lot!

Best regards,

DataNibbler

5 Replies
anbu1984
Master III
Master III

Like this

Load * where Index(Txt,'*');

Load * Inline [

Txt

hi

*

hello

* ];

datanibbler
Champion
Champion
Author

Hi,

I've got an idea - chr(42) should print the * - that way I could avoid actually using it.

anbu1984
Master III
Master III

Load * where Index(Txt,'*') and Trim(Len(Txt))=1;

Load * Inline [

Txt

hi

*

hello*

hello

* ];

EDIT:

Load * where Trim(Txt) ='*';

Load * Inline [

Txt

hi

*

hello*

hello

* ];

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

I would you use the transformation wizard (from Table Files... option from the script editor). Click Enable Transformation, and select the Fill tab. Click Fill..., enter the target column (the one to be filled), in the cell condition enter 'contains' and * and choose fill type 'Above'. This will add the filter expression (bold) to the file qualifier like this:

(ooxml, embedded labels, header is 1 lines, table is Sheet1, filters(Replace(1, top, StrCnd(contain, '*'))))

This will now autofill column 1 with the previous value when column 1 contains a *

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
datanibbler
Champion
Champion
Author

Hi Jonathan,

that sounds really good and doable. I'd just rather try to do it "manually" in a separate step - in a RESIDENT LOAD. That way, my code will be easier to understand for others than if I do the transformation right in the primary LOAD.

Thanks a lot anyway!

I realized the chr(42) won't do, but I can use sth like Keepchar([field], '*').