Quantcast
Channel: Data Preparation & Blending discussions
Viewing all articles
Browse latest Browse all 4999

Parse Attributes with Proper Output Using Commas and 'And'

$
0
0

Using the table below my goal is to have a properly formatted string I can use for reporting purposes. I would filter based on whether the column attributes included "Improve" and concatenate them. However, I'm not too sure how to go about formatting the Result properly by removing additional "Improve"'s and using commas and the word 'and' when appropriate. Thanks in advance for suggestions!

 

IDProdDessertProdSuppliesProdFoodProdFoodSvcResult
1Improve Dessert SalesOk Supplies SalesHigh Food SalesOk Food Services SalesImprove Dessert Sales
2Ok Dessert SalesOk Supplies SalesImprove Food SalesOk Food Services SalesImprove Food Sales
3Ok Dessert SalesOk Supplies SalesOk Food SalesOk Food Services Sales 
4Ok Dessert SalesOk Supplies SalesImprove Food SalesImprove Food Services SalesImprove Food Sales and Services Sales
5Improve Dessert SalesImprove Supplies SalesOk Food SalesImprove Food Services SalesImprove Dessert Sales, Supplies Sales and Food Services Sales

Viewing all articles
Browse latest Browse all 4999

Trending Articles