Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
berryandcherry6
Not applicable

Load inline using variables

HI,

MetricsDims:

LOAD * INLINE [

      Metrics  , value

    Invitations1 , $('Count({$<DateType={''signed''},user_signed={1}, client_name = {''Repair.com''},CanonicalDate = {<=$'&'(=WeekEnd(today(),-1))"}>}invitation_id)')

    Invitations2 , $(=vInvitation_count)

    Invitations3 , $(vInvitation_count)

Invitations4 , =$(vInvitation_count)

];

where let vInvitation_count = 'Count({$<DateType={''signed''},user_signed={1}, client_name = {''Repair.com''},

CanonicalDate = {"<=$' &'(=WeekEnd(today(),-1))"}>}invitation_id)';

None of them display value. How should i achieve this?

Note : Equations in column two differs

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Not applicable

Re: Load inline using variables

You can't evaluate strings like that as separate expressions per row. You'll have to create a single expression using a pick-match combination. See this discussion: Expressions in Fields


talk is cheap, supply exceeds demand
5 Replies
vikasmahajan
Not applicable

Re: Load inline using variables

You can achieve the same using load excel using variables refer this

Load expressions from Excel and use in chart

Gysbert_Wassenaar
Not applicable

Re: Load inline using variables

Not sure what you're trying to do. If you want to postpone the dollar expansion you can use a different character and a replace:

MetricsDims:

LOAD Metrics, Replace(value, '@','$') as value INLINE [

      Metrics  , value

    Invitations1 , "Count({$<DateType={''signed''},user_signed={1}, client_name = {''Repair.com''},CanonicalDate = {<=@(=WeekEnd(today(),-1))"}>}invitation_id)"

    Invitations2 , @(=vInvitation_count)

    Invitations3 , @(vInvitation_count)

Invitations4 , =@(vInvitation_count)

];


talk is cheap, supply exceeds demand
berryandcherry6
Not applicable

Re: Load inline using variables

HI,

I saw this in other post, i had tried it.

What i need is that in inline table i have to get variable value. But in column two i get equations.

but i get like this

Capturedf.PNG

in load script

MetricsDims:

LOAD Metrics , Replace(Datavalue, '@','$') INLINE [

      Metrics  , Datavalue

    Invitations , @(vProgrexion_Last_Campaign_Completion_Count1)

    Delivered ,  @(=vProgrexion_Last_Campaign_Completion_Count)

];

Gysbert_Wassenaar
Not applicable

Re: Load inline using variables

You can't evaluate strings like that as separate expressions per row. You'll have to create a single expression using a pick-match combination. See this discussion: Expressions in Fields


talk is cheap, supply exceeds demand
berryandcherry6
Not applicable

Re: Load inline using variables

HI,

I read that,i didn't understand how to apply in my scenario or how to use it, Sorry for this. can you please show me some coding for this

Regards,

Supriya