Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

How to reduce number line of my in line load ?

Hi All

I hv below script , from time to time i need to change the gap , now is 0.5 gap , some time i need 0.1 gap,  it there any way i can just modify 1 number ?

VolumeIncrease:

LOAD * INLINE [

    Volume_up

    -.3

    -.2

    -.15

    -.1

    -.05

    0

    .05

    .1

    .15

    .2

    .3

thank you for your reading.

1 Solution

Accepted Solutions
tresesco
Not applicable

Re: Re: How to reduce number line of my in line load ?

Try like attached sample:

Let vIterNo=10;
Let vStep=0.1;
Let vStart=-0.3;

Load

If( RecNo()=1,$(vStart), Peek('Volume_up_1')+$(vStep)) as Volume_up_1

AutoGenerate $(vIterNo);

Note: This would give you the flexibility of setting start, step and interation number.

8 Replies
sujeetsingh
Not applicable

Re: How to reduce number line of my in line load ?

not to worry here man you can write an iterative script to do so

Not applicable

Re: How to reduce number line of my in line load ?

Hi,

     It depends on your condition which you want to apply for gap.  Can you please tell us that on which condition you want  gap??

Thanks

Ashutosh

Not applicable

Re: How to reduce number line of my in line load ?

Hi Sir

For example Instead of i keep repeat the below script , i want the script to be shorter.for easy maintenance.

LOAD * INLINE [

    Volume_up_1

    -.3

    -.25

    -.2

    -.15

    -.1

    -.05

    0

    .05

    .1

    .15

    .2

    .25

    .3

LOAD * INLINE [

    Volume_up_2

    -.3

    -.2

    -.1

    0

    .1

    .2

    .3

tresesco
Not applicable

Re: Re: How to reduce number line of my in line load ?

Try like attached sample:

Let vIterNo=10;
Let vStep=0.1;
Let vStart=-0.3;

Load

If( RecNo()=1,$(vStart), Peek('Volume_up_1')+$(vStep)) as Volume_up_1

AutoGenerate $(vIterNo);

Note: This would give you the flexibility of setting start, step and interation number.

Not applicable

Re: How to reduce number line of my in line load ?

Thank you sir , i will use this script to shorten my existing one.

Not applicable

Re: Re: How to reduce number line of my in line load ?

Hi tres

I try to create using your code , i get #### at zero point , which is not so serious , just in case you can let me know why this happen , and how to avoid the ##### from appear ?

Not applicable

Re: How to reduce number line of my in line load ?

Hi,

     I think this is because of number format...

Go to ListBox property>> Number tab >> and change your number format like this....

Capture.JPG

hope this helps you

Ashutosh

Not applicable

Re: How to reduce number line of my in line load ?

Yes you are right. now working