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: 
shahamel
Creator
Creator

Let statement as set statement

Dear QV-users,

i would like to have the result of this formula as a set statement

RangeCount

(count(

{$<

    
LeerlingRecordId =

{
"=

SUCCESVOL = '1'     


"
}

>}

DISTINCT LeerlingRecordId),BEKOSTIGD,OMVANG_OPLEIDING,Gecorrigeerde_Uitschrijving,KWALIFICATIE_NIVO,VERBINTENIS_NUMMER)

___

for example:


LET test = '

RangeCount

(count(

{$<

    
LeerlingRecordId =

{
"=

SUCCESVOL = '1'     


"
}

>}

DISTINCT LeerlingRecordId),BEKOSTIGD,OMVANG_OPLEIDING,Gecorrigeerde_Uitschrijving,KWALIFICATIE_NIVO,VERBINTENIS_NUMMER)

'


SET test2 = test

When i use Set as expression i would like to see the result of the formula i use above.

Gr. Sandeep

7 Replies
manideep78
Partner - Specialist
Partner - Specialist

Ofcourse you can use  SET test2 = test;

shahamel
Creator
Creator
Author

Unfortunately this is not what i ment. i will give you a more simple example of what i want

SCRIPT:

LET  FORMULE = 7 + 1 ;

SET  FORMULE2 = FORMULE

When i look at my settings -  variables i would like to see at variable FORMULE2

NOT

FORMULE2 = FORMULE, but

FORMULE2= 8

when it comes to my real situation i don't want to see at settings - variables

TEST2 =

RangeCount(

    count({$<LeerlingRecordId={"=SUCCESVOL='1'"}>} DISTINCT LeerlingRecordId)

    ,BEKOSTIGD,

    OMVANG_OPLEIDING,

    Gecorrigeerde_Uitschrijving,

    KWALIFICATIE_NIVO,

    VERBINTENIS_NUMMER) ;

BUT

TEST2 = 82

Gr. Sandeep

shahamel
Creator
Creator
Author

Unfortunately this is not what i ment. i will give you a more simple example of what i want

SCRIPT:

LET  FORMULE = 7 + 1 ;

SET  FORMULE2 = FORMULE

When i look at my settings -  variables i would like to see at variable FORMULE2

NOT

FORMULE2 = FORMULE, but

FORMULE2= 8

when it comes to my real situation i don't want to see at settings - variables

TEST2 =

RangeCount(

    count({$<LeerlingRecordId={"=SUCCESVOL='1'"}>} DISTINCT LeerlingRecordId)

    ,BEKOSTIGD,

    OMVANG_OPLEIDING,

    Gecorrigeerde_Uitschrijving,

    KWALIFICATIE_NIVO,

    VERBINTENIS_NUMMER) ;

BUT

TEST2 = 82

Gr. Sandeep

manideep78
Partner - Specialist
Partner - Specialist

Use this Statement

SET vFormula2 = $(vFormula);

See attached qvw,

Goto Settings--> Document Properties--> Variables.

U can see you variable as you like.

shahamel
Creator
Creator
Author

This is my current script:

LOAD

* Inline [
test, naam
1,hoi
2,doei
]
;

SET onderdeel = {<test = {'hoi'}>};
LET vA= count($(onderdeel)test);
SET vB= $(vA);

WHen i run this i would expect to see at

setings --> document properties --> varables

vB = 1

but instead i get this

the script reload, but not succesfully

it says:

reload script failed. Reload old data?

Yes/No

if you know a way to make a variable like 'onderdeel' that works i am mostly gratefull.

Gr. sandeep

manideep78
Partner - Specialist
Partner - Specialist

Set  analysis donot work in the script part.

manideep78
Partner - Specialist
Partner - Specialist

Still I didn't understood what you need. But little bit information i can give you, but what is the use of it?

Tab1:

LOAD *,If(naam='hoi',test) as Val;

LOAD * INLINE [

    test, naam

    1, hoi

    2, doei

];

LET vA =FieldValueCount('Val');

LET vB=$(vA);

Hope it helps you.