Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi every buddy
I have a Data base that contain my product code and product name...but the problem is where my codes are unique but every unique code have so much different product name that are different in character and alphabet...for example :
1 AAAA
1 AAAA(B)
1 AAA
1 A
all of that product code 1 is for one product but its name are different cause of operator's fault.
now the question is how can i show this product with code 1 and with just one of the product name ( it doesn't different which one)
sometime the difference between names are just ONE MORE SPACE.
please! anybody can help me?
You can apply a common name by creating a mapping table and using ApplyMap on your name.
MapName:
Mapping load
[Good code],
[Good name]
From example.xls ;
Load
[Good code],
Applymap('MapName',[Good code]) as [Good name]
From example.xls;
use an aggregation function and a group by product ID when loading the table
maxstring, minstring, firstsortedvalue, ...
(eventually calculating something about the length of the product code (len) ,...)
or... in order to get them "ALL" in one field: concat(product name,' | ') as aggregation function; so you'll get for ID 1 :AAAA|AAAA(B)|...
many many possibilities 🙂
Hi,
Maybe this:
INPUTS:
LOAD [Good Code],
[Good Name]
FROM
[.\Example(1).xlsx]
(ooxml, embedded labels, table is Document_CH21);
RESULTS:
LOAD
[Good Code],
MaxString([Good Name]) as New_GOOFNAME
Resident INPUTS
Group By [Good Code];
DROP Table INPUTS;
output:
If you can accept the Name to be a Dual Value then you can get your desired result with this simple script.
Data:
LOAD
[Good Code],
Dual([Good Name], [Good Code]) as [Good Name]
FROM
[..\Downloads\Example.xlsx]
(ooxml, embedded labels, table is Document_CH21);
Just check to be sure Vegar's post(s) got you what you needed for your use case? If so, please be sure to return to things and use the Accept as Solution on the post(s) that helped you get a working solution for your use case. If you still require further assistance, please leave a further update.
Here is a Design Blog post regarding the Mapping load Vegar mentioned too:
https://community.qlik.com/t5/Qlik-Design-Blog/Mapping-and-not-the-geographical-kind/ba-p/1463192
In case you want to search further in that area, here is the base URL:
https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog
There are hundreds of posts in that area from our experts on how-to related topics for the most part, so you should find it very helpful.
Regards,
Brett