Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi I have table with three columns, i want to show only true condition if there is true and false condition for same ID
if there is one condition for ID, it come as it is like below output
ID | names | condition |
1 | abc;aba;bca | yes |
1 | abc;aba;bca | No |
2 | fff;lll;mmm | yes |
2 | fff;lll;mmm | No |
3 | qqq;www;rrr | No |
3 | qqq;www;rrr | yes |
4 | kkk;ooo | NO |
5 | ggg;aaa;zzz | NO |
Output
ID | condition | |
1 | yes | |
2 | yes | |
3 | yes | |
4 | NO | |
5 | NO |
renaming your first field as row(field name must be unique in table)
take table
dimension> row, condition
measure > Only({<condition={"YES"}>+<names={"=count({1}row)=1"}>}names)
Regards,
Prashant Sangle
Done,Try the following code
TRUE:
load * inline [
ID,names,condition
1,abc;aba;bca,Yes
1,abc;aba;bca,No
2,fff;lll;mmm,Yes
2,fff;lll;mmm,No
3,qqq;www;rrr,No
3,qqq;www;rrr,Yes
4,kkk;ooo,No
5,ggg;aaa;zzz,No
];
T:
Load Distinct
ID as New_ID
Resident TRUE
where condition = 'Yes';
T1:
Load Distinct
ID as ID1,
names,
If(Exists(New_ID,ID),'Yes','No') as cond
Resident TRUE;
Drop Table TRUE;
Use ID1,names,cond as dimension in frontend
renaming your first field as row(field name must be unique in table)
take table
dimension> row, condition
measure > Only({<condition={"YES"}>+<names={"=count({1}row)=1"}>}names)
Regards,
Prashant Sangle
There is small change in Output, I want those results in front end
the expression is for front end only
The above results shown names based on condition values,
But I want condition values based on names
please check the tables once
the above expression shows only Yes condition values only
Done,Try the following code
TRUE:
load * inline [
ID,names,condition
1,abc;aba;bca,Yes
1,abc;aba;bca,No
2,fff;lll;mmm,Yes
2,fff;lll;mmm,No
3,qqq;www;rrr,No
3,qqq;www;rrr,Yes
4,kkk;ooo,No
5,ggg;aaa;zzz,No
];
T:
Load Distinct
ID as New_ID
Resident TRUE
where condition = 'Yes';
T1:
Load Distinct
ID as ID1,
names,
If(Exists(New_ID,ID),'Yes','No') as cond
Resident TRUE;
Drop Table TRUE;
Use ID1,names,cond as dimension in frontend
Hi @Afa_Momin ,
How can we get these ouput in front end
Hi @pala_jagadeesh ,
did you try that expression which I have suggest. It is giving the same result which you are asking for.
What is output you got when you apply that expression.
Yes
@PrashantSangle ,it gives only Yes values