Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
As a new user I can't seem to find a solution to my problem. Product has a unique number, so this is used as a dimension, but one number can have different names (with a prefix, different translations and so on). I have an idea how to remove names with a certain prefix but I do not really care about which name to display in my table. Like just pick the first name. The problem for me comes with handling string values instead of numbers.
So my data looks like this
product no | name |
1 | Thing |
1 | Thing -Free |
1 | ThInG |
2 | OneMore |
2 | OneMore -Free |
And i want something like this
product no | name |
1 | Thing |
2 | OneMore |
This is probably a simple problem but I would appreciate the help.
Hi @DavidJG , please try this example and see if it is a solution for your question.
DataX:
Load * INLINE [
ProductNo, Name
1, Thing
1, Thing -Free
1, ThInG
2, OneMore
2, OneMore -Free
];
DataFinal:
Load distinct
ProductNo
Resident DataX;
left join
Load
if(rowno() = 1, ProductNo, if(ProductNo = Previous(ProductNo),null(), ProductNo)) as ProductNo,
Name as Name
Resident DataX
;
drop table DataX;
Hi @DavidJG , please try this example and see if it is a solution for your question.
DataX:
Load * INLINE [
ProductNo, Name
1, Thing
1, Thing -Free
1, ThInG
2, OneMore
2, OneMore -Free
];
DataFinal:
Load distinct
ProductNo
Resident DataX;
left join
Load
if(rowno() = 1, ProductNo, if(ProductNo = Previous(ProductNo),null(), ProductNo)) as ProductNo,
Name as Name
Resident DataX
;
drop table DataX;