3 Replies Latest reply on Jun 25, 2018 1:04 PM by Deepak Rai

# Summing another column by the multiple values in one cell

Hi Everyone,

I'm trying to calculate the total number of associates trained on a certain model of phone within a visit to the store. The issue is that one training session may cover multiple models of phones and the models are all captured in a single cell (see below).

 VisitId EndDate EndTime FirstName StateProvince Store Training # of Associates Trained 313184 12/3/2017 13:45:00 Michael AB Shawnessy Town Centre V30 0 313206 12/3/2017 17:01:00 Michael AB Westhills Town Centre V30 0 313314 12/3/2017 15:10:00 Michael AB BB #945 - Sunridge GPAD 4 1 313369 12/3/2017 12:46:00 Michael AB BB #741 - Shawnessy GPAD 4,V30 1 313384 12/3/2017 17:38:00 Michael AB BB #902 - Westhills Calgary BB GPAD 4 0 313391 12/3/2017 15:59:00 Michael AB BB #746 - Beacon Hill GPAD 4 1 314569 12/3/2017 14:10:00 Jeffrey ON Freedom Fairview Mall Q6,G6,GPAD 4,Promotions,V30 2 314571 12/3/2017 17:00:00 Jeffrey ON Bell (Fairview Park Mall) Q6,G6,Promotions,V30 1 314760 12/3/2017 16:54:00 Scott ON WOW! DEVONSHIRE MALL V30 2 316310 12/3/2017 15:10:00 Scott ON Bell (Devonshire Mall) Q6,V30 3 316312 12/3/2017 15:30:00 Scott ON Windsor G6,GPAD 4 2 316315 12/3/2017 14:40:00 Scott ON Devonshire Mall Q6,V30 4

The goal is to display the data like this:

 Device Training Sessions Associates Trained by Device G6 380 888 Q6 275 659 V30 347 803 G5 42 96 V20 3 8 Stylo 3 Plus 7 15 X Power 2 15 84 G4 2 4 GPAD 4 105 300 TOTALS 1,176 2,857

In excel, I have just leveraged the sumif function but am not sure how to achieve the same outcome within tableau. I would also like to graph the training session by device over time.

I have attached a sample workbook and would appreciate any assistance you could give

Brent

• ###### 1. Re: Summing another column by the multiple values in one cell

Hi Brent,

Pl attach  a .twbx

Thanks

Deepak

• ###### 2. Re: Summing another column by the multiple values in one cell

Here you go

• ###### 3. Re: Summing another column by the multiple values in one cell

Hi Brent,

Here itis:

You need to Split your data over comma, then Union Split Eight Times , Write a Calculation to Createa new Field " Training Tye" and Then Create View

Thanks

Deepak

If it Helps, Pl mark it Helpful and CORRECT To close Thread