0

How to Get Percentage of Duplicate Data on One Column

I have the data source below:

I'm having a hard time figuring out how will I able to find out the percentage of duplicates on the first column.

I tried using COUNTDISTINCT and GROUPBY but no success. 

Can anyone help or provide me guidance on this?

1 comment

  • 0
    Avatar
    Janice Janczyn

    Hi Gilbert,

    Great question! This is simple to do using the Actions menu. Assuming you're building a table klip (although this approach will work with other klip types):

    • point your first Table column (Column1) to the ga:dimension1 column in your datasource
    • add a hidden data column (Data1) and point it to ga:dimension1 as well
    • group your ga:dimension1 data: click the 3 dots menu to the right of your first column and click Group
    • count the number of items in each ga:dimension1 grouping: click the 3 dots menu to the right of your hidden data and click Aggregation > Count
    • in your second Table column (Column2) use the following formula and set the format to Percentage:

                            &Data: Data1 / COUNT( !Column: Column1) 

     

    The results reference (&) to Data1 returns the count of each grouping and the formula reference (!) returns the original list of data in Column1. Hope this helps!

     

    Thank you,
                 Janice

Please sign in to leave a comment.