Do your hours run directly into the text?
For example, "12/TCER" would be 12 hours with item code TCER?
I can help you out with this but to get it right I need to make sure how each hour/item code combo is structured.
No, the hours are in a separate row. I put them in Tableau in Rows as a SUM([Hours]) so all I have to do is chop up the itemcode column into those sums.
1 of 1 people found this helpful
In that case, try this:
Calculated field - "TC Items" ...
IF CONTAINS( [item_code], '/TC')
THEN "TC Item"
ELSEIF CONTAINS( [item_code], '/SC')
THEN "SC Item"
You would now have a dimension that would chop your items into different bars in a worksheet, divided into two camps: one camp with items that started with /TC and another with items that started with /SC.
Hope that helps,
Another approach would be, Creating calculated field as
IF STARTSWITH([Item_Code],"/TC")=TRUE THEN 'TC Item'
ELSEIF STARTSWITH([Item_Code],"/SC")=TRUE THEN 'SC Item'
Wow! Thanks! I learned a lot! (Like, it doesn't go at the top but on the left creating a new calculation.) Now that I know that, it shouldn't be too difficult to noodle once I learn some syntax!