Given the data structure, I can't think of a better solution, however this one is too ugly and prone to error - for example, it's enough that product code contains 0, and this formula will assume that 0 is the size.
I'd try hard to obtain better data.
maybe one solution, using a table of sizes, could be also:
tabSizes: LOAD Text(size) as size INLINE [ size 0X/1X F2 2X/3X XS/S 00P 0 1X 2P 2X 2 3X 4P 4 6P 6 8P 8 10P 10P 10 12 ]; mapSizes: Mapping LOAD *, '@start@'&size&'@end@' Resident tabSizes; tabText: LOAD yourtext, Text(TextBetween(size,'@start@','@end@',IterNo())) as size While IterNo()<=SubStringCount(size,'@start@'); LOAD *, MapSubString('mapSizes',yourtext) as size INLINE [ yourtext TAFFY PINK14P 9625423 9699439 ULTRA WHIT 2P ULTRA WHITXXS 9699439 9699439 ULTRA WHIT0X/1X ];
hope this helps
QlikCommunity_Thread_177859.qvw 151.5 K