Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I want to change the content of my field based on three conditions:
-if contains '_AB' change to AB,
-if contains '_CD' change to CD,
-others leave as it is.
Where is my error in the following code? Thank you in advance!!!
LOAD
NAME,
IF(WILDMATCH(NAME, '*_AB*'),'AB', NAME
and WildMatch(NAME, '*_CD*'), 'CD', NAME) as NewField
FROM [lib://SAMPLE/Mappe1.xlsx]
(ooxml, embedded labels, table is Tabelle1);
best,
Rustam
ok It means your fieldvalue of NAME field having _ at various places...
please post limited load sample data for better understanding..
Hi
Pick(wildMatch(NAME, '*_PC*', '*_AC*') + 1, NAME, 'PC', 'AC') as NewField
or
Pick(wildMatch(NAME, '*_PC', '*_AC') + 1, NAME, 'PC', 'AC') as NewField
(if _PC or _AC only appear at the end of NAME)
HTH
Jonathan
Many Many Thanx Jonathan !!!!
It worked. That is what i have been exactly looking for:)
best,
Rustam
Hi jonathan,
I am having the sheet like above. you can see the numbers 51-55, 101-105, 151-155.
I need change those labels to Q1-Q5 as in first graph.
The scripts i am using:
Dimension: IF(match(question_id,'51','52','53','54','55'),question_id)
Measures:
Count({$<subject_id={2},is_correct_answer={1},test_type={course},final_test_status={passed}>}question_id)
Count({$<subject_id={2},is_correct_answer={0},test_type={course},final_test_status={passed}>}question_id)
I used below script but it is not working.
pick(mixMatch(question_id,'51','52','53','54','55'),question_id,'Q51','Q52','Q53','Q54','Q55')
I think this is helpful to understand the issue i am facing.
Thanks,
Pramod