Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hy!
I have following table:
| delivery | country |
| 123 | GB |
| 123 | GB |
| 123 | GB |
| 123 | GB |
| 455 | IT |
| 455 | IT |
| 455 | FR |
| 455 | IT |
| 455 | FR |
| 1234 | DE |
| 1234 | DE |
| 1234 | DE |
| 1234 | DE |
Would like to recognize if the delivery only took place in one country:
| delivery | delivery in one country? |
| 123 | true |
| 455 | false |
| 1234 | true |
Do you have an idea for me?
Thank you!
Hi,
As expression try with:
if(count(TOTAL <delivery> distinct country)=1,'True','False')
Any idea?
Need a solution in the script instead in expression 🙂
THANK YOU!
In script statement, try with :
TABLE:
LOAD *
INLINE [
id,delivery,country
1,123, GB
2,123, GB
3,123, GB
4,123, GB
5,455, IT
6,455, IT
7,455, FR
8,455, IT
9,455, FR
10,1234, DE
11,1234, DE
12,1234, DE
13,1234, DE
];
TABLE2:
load
if(count (distinct country)=1,'true','false') as delivery_in_one_country?,
delivery
resident TABLE
group by delivery;