Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Please i have a question about mapping
i have field called Activity
which has the values of 1,2,3,4
i want to represent them with names A,B,C,D
so i made mapping
LOAD * Inline
[
Activity , Name
1,A
2,B
3,C
4,D
];
when i select Name it reflects to the Activity
but when i used the Activity in the expression it doesn't reflect anything
hope the attached example clarify the problem
Sorry Mona - if you'd like to expand on what you are trying to achieve and why you're taking the approach you are then maybe we can help more. I'm afraid I really don't understand what you're trying to do. Does Stefan's expression above do it for you?
Jason
Thanks Alot Stefan
it's working
but if u please explain what's meant by ch(39) as i can't undersatnd your expression
but it's working correctly,just i need to understand
Mona,
the expression
'$(=concat(ActivityNew,chr(39)&','&chr(39)))'
will create a list of the comma separated ActivityNew values, each in quotes (chr(39) is calling the function to return ' with given ASCII code 39 for ' ). The list will then be taken as element_set by the set analysis expression, assigning the values to the field Activity.
I noted also that adding a DISTINCT before ActivitiyNew might be a bit more elegant.
Hope this solves your issue.
Regards,
Stefan
P.S: In cases like that, it might be good to spend a few words on your "big picture", this may allow to disregard some solutions upfront and may save some time
Nicely done Stefan
Mona - please make sure you credit Stefan for the answer by marking it as "correct".
Jason
Just to add a note: I just found a much easier solution:
Sum({$<Activity= p(ActivityNew) >}Value)
Regards,
Stefan
Thanks so much Stefan and Jason
i will try your second solution Stefan
Best Regards,
Mona