# Segregating Company Segments in separate rows

Version 1

My original post: Company Segment Rows

Before:

After:

Steps:

This formula is to get around the fact Tableau doesn't allow groups to be referenced in formulas.  The reference to "Category 1/2" - there are many different sub-categories of account types included in FI & CGNP respectively.

Calculation Name: Segments Calc FI & CGNP

CASE [Company Segment]

WHEN " Category 1 " THEN "FI"

WHEN " Category 2 " THEN "CGNP"

WHEN " Category 2 " THEN "CGNP"

WHEN " Category 1 " THEN "FI"

WHEN " Category 1 " THEN "FI"

WHEN " Category 1 " THEN "FI"

WHEN " Category 1 " THEN "FI"

WHEN " Category 1" THEN "FI"

WHEN " Category 1" THEN "FI"

WHEN " Category 2 " THEN "CGNP"

WHEN "Category 1" THEN "FI"

ELSE "Other" END

To segregate between rows

Calculation name: Region & Segment Breakdown Calc

IF [Opportunity Region] = "North America" AND [Segments Calc FI & CGNP] = "CGNP" THEN "NORAM CGNP"

ELSEIF [Opportunity Region] = "North America" AND [Segments Calc FI & CGNP] = "FI" THEN "NORAM FI"

ELSE [Opportunity Region]

END

Else is for: This is the catch-all for anything that doesn’t match with the above and will list as "Other"

It made my MONTH when I found the solution to my issue!!!

Hope this helps other newbies!