Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Split and sum the distinct Values

Hi,

 

I have a dataset as below:

 

NameValueTypeTier
Sarath2048
2048
256
Type2
Type2
Type2
Tier1
Tier2
Tier1
Kumar1024
1024
1024
300
Type1
Type1
Type1
Type1
Tier1
Tier1
Tier2
Tier2

 

I need to split the Type and Tier and then count the distinct Values.

 

Kindly help.

  • Hi Anonymous 

     

    I happened to know how to achieve this!!

    1. Create the table as your sample:

    2. Transpose the table:

    3. Split the column by delimiter:

    4. Transpose back the table:

    5,Fill down the first column and change the datatype of column2

    6. Group the rows:

     

8 Replies

  • natabird3's avatar
    natabird3
    Skilled Sharer

     

    I am not sure i understand correctly what you try to do. But if you are trying to split the number from the text in a separate column from type and tier, you can go to edit query and select the option (right click on type column): split column by position. Select 0, 4 and after select ok you should get the desired result number separated from column. To get the count simply add in a visual and in the formatting option select the count. Hope this is what you were after if not please clarify a bit.

    • Anonymous's avatar
      Anonymous
      Not applicable

      I want to count the Values based on the Tier.

      My data should show like below:

       

      Sarath Type2 Tier1 2304
      Sarath Type2 Tier2 2048

       

      Kumar Type1 Tier1 2048
      Kumar Type1 Tier2 1324

       

      My problem here is as I am having all the details in one cell, if I split the cell into rows, my row size increases and hence the count is not happening.

       

      Is there any way to acheive this??

      • Ashish_Mathur's avatar
        Ashish_Mathur
        Super User

        Hi,

        I am not clear.  Is that data in 4 rows?  Clearly show the input Tables and the expected result.