Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
ferranpuchol
New 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

Re: How to count spaces at the beginning of each row?

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
4 Replies
Luminary
Luminary

Re: How to count spaces at the beginning of each row?

Hi, you can use this function

substringcount(yourField, ' ')

ferranpuchol
New Contributor

Re: How to count spaces at the beginning of each row?

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?

Re: How to count spaces at the beginning of each row?

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
New Contributor

Re: How to count spaces at the beginning of each row?

Thanks!!!!

Community Browser