Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
berryandcherry6
Creator II
Creator II

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

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

View solution in original post

5 Replies
vikasmahajan

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

Load expressions from Excel and use in chart

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
Gysbert_Wassenaar

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
Creator II
Creator II
Author

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

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
Creator II
Creator II
Author

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