Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi qlikss
I have a table
NUM name. Name2
1. 0. 0
2. John. 0
3. 0. Roc
I want my output table like this
NUM name. Name2. Comment
1. 0. 0. Name is zero
1. 0. 0. Name2 is zero
2. John. 0. Name2 is zero
3. 0. Roc. Name is zero
Someone help me
Hi @stonecold111 , a lot of fun with this, i just create this example, considering that the dots doesnt exists, if they exists, just replace 0 with '0.' :
DataX:
Load * INLINE [
Num, Name, Name2
1, 0,0
2,John Cena,0
3,0, The Rock
];
Comment:
Load
Num,
if(Name = 0, 'Name is Zero') as Comment
Resident DataX;
Load
Num,
if(Name2 = 0, 'Name2 is Zero') as Comment
Resident DataX;
This is the result,
please consider this :
Let my know if this is an acceptable solution!
Help me
Try if([name.] = '0.', 'Name is zero', if([Name2.] = '0.', 'Name2 is zero', 'Not zero'))
But I want name is zero and name2 is zero
For same number
I want same comments that shown above
Hi @stonecold111 , a lot of fun with this, i just create this example, considering that the dots doesnt exists, if they exists, just replace 0 with '0.' :
DataX:
Load * INLINE [
Num, Name, Name2
1, 0,0
2,John Cena,0
3,0, The Rock
];
Comment:
Load
Num,
if(Name = 0, 'Name is Zero') as Comment
Resident DataX;
Load
Num,
if(Name2 = 0, 'Name2 is Zero') as Comment
Resident DataX;
This is the result,
please consider this :
Let my know if this is an acceptable solution!
Try this,
tab1:
Load * INLINE [
Num, Name, Name2
1, 0,0
2,John Cena,0
3,0, The Rock
];
tab1X:
CrossTable(Names, Value)
LOAD * Resident tab1;
Left Join(tab1)
LOAD Num, Concat(DISTINCT If(Value=0,Names&' is Zero'),', ') As Comment
Resident tab1X
Group By Num;
Drop Table tab1X;
Output:
Thank s Fabian.
Worked like charm.
Even the names that I have in my mind are jhon cena and Dwayne the rock Johnson when I'm typing my sample data😁
You guessed it right.
Another way of doing is with cross table.
Thanks all of you.
Thanks sarand7.
I can accept only one reply as solution.
You both are awesome.