Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
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

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
Luminary Alumni
Luminary Alumni

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

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!!!!