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: 
ferranpuchol
Partner - Contributor
Partner - Contributor

How to count spaces at the beginning of each row?

Hi everyone,

I need to count how many space characters are at the beginning of every row, but qv automatically deletes them.

How can I do it?

Thanks for your answer.

Ferran.

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You need to set the Verbatim variable to 1 to prevent Qlikview from stripping the spaces. In the script you can add this line to prevent the trimming:

set Verbatim = 1;



talk is cheap, supply exceeds demand

View solution in original post

4 Replies
jvitantonio
Specialist III
Specialist III

Hi, you can use this function

substringcount(yourField, ' ')

ferranpuchol
Partner - Contributor
Partner - Contributor
Author

I doesn't work, it returns 0. QV automatically deletes the spaces from the beginning of the load and i need to not do this.

Any other solution?

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You need to set the Verbatim variable to 1 to prevent Qlikview from stripping the spaces. In the script you can add this line to prevent the trimming:

set Verbatim = 1;



talk is cheap, supply exceeds demand
ferranpuchol
Partner - Contributor
Partner - Contributor
Author

Thanks!!!!