+ Reply to Thread
Results 1 to 5 of 5

Count Similar Values

Hybrid View

  1. #1
    Registered User
    Join Date
    12-18-2018
    Location
    Alpharetta, GA
    MS-Off Ver
    2016
    Posts
    38

    Count Similar Values

    Hi, I have a column that has unstructured data. I would like to know the best way to separate similar values in a way so that i can count them. Ex. the ones in the Orange font are similar to one another. I would like the ability to group all rows containing "Allscripts", and also be able to breakdown if it is Allscripts MA" or "Allscripts - IL". The ones in the green are similar.

    Background: it seems like the order in which the selections are made in the source system, is how it ends up displaying in the export of raw data. Each row can have a different # of selections.

    I have attached a sample set. Please let me know if there are any questions.

    Any assistance would be appreciated!
    Attached Files Attached Files

  2. #2
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,213

    Re: Count Similar Values

    Maybe try
    Open Power Query/Get and Transform. Click on New Query.
    Open blank query in the editor, launch Advanced Editor and paste in the following code.

    let
        Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
        #"Changed Type" = Table.TransformColumnTypes(Source,{{"Jurisdiction", type text}}),
        #"Added Index" = Table.AddIndexColumn(#"Changed Type", "Index", 1, 1, Int64.Type),
        #"Merged Queries" = Table.FuzzyNestedJoin(#"Added Index", {"Jurisdiction"}, #"Added Index", {"Jurisdiction"}, "Added Index", JoinKind.LeftOuter, [IgnoreCase=true, IgnoreSpace=true, Threshold=0.8]),
        #"Removed Columns" = Table.RemoveColumns(#"Merged Queries",{"Jurisdiction"}),
        #"Expanded Added Index" = Table.ExpandTableColumn(#"Removed Columns", "Added Index", {"Jurisdiction", "Index"}, {"Jurisdiction", "Index.1"}),
        #"Removed Duplicates" = Table.Distinct(#"Expanded Added Index", {"Index.1"}),
        #"Grouped Rows" = Table.Group(#"Removed Duplicates", {"Index"}, {{"Count", each Table.RowCount(_), Int64.Type}, {"All", each _, type table [Index=number, Jurisdiction=nullable text, Index.1=nullable number]}}),
        #"Expanded All" = Table.ExpandTableColumn(#"Grouped Rows", "All", {"Jurisdiction", "Index.1"}, {"Jurisdiction", "Index.1"})
    in
        #"Expanded All"
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    12-18-2018
    Location
    Alpharetta, GA
    MS-Off Ver
    2016
    Posts
    38

    Re: Count Similar Values

    Thank you for the prompt response! I tried that but got the attached error.
    Attached Images Attached Images

  4. #4
    Registered User
    Join Date
    12-18-2018
    Location
    Alpharetta, GA
    MS-Off Ver
    2016
    Posts
    38

    Re: Count Similar Values

    Hi @Bo_Ry, i was wondering if you could advise on the error i received after following your instructions.

  5. #5
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,213

    Re: Count Similar Values

    I don't see any error on the file from post #2 ,no idea where it went wrong.
    Attached Images Attached Images
    Last edited by Bo_Ry; 07-24-2020 at 01:04 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. count similar words
    By Nuviman in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 05-12-2017, 11:07 AM
  2. Replies: 1
    Last Post: 04-30-2014, 05:49 PM
  3. Replies: 5
    Last Post: 10-26-2013, 01:03 PM
  4. Finding similar but not identical values using COUNT and COUNTIF
    By krixtoffer in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-25-2011, 05:44 AM
  5. Count AND show similar values
    By Jexcel in forum Excel General
    Replies: 6
    Last Post: 02-26-2008, 08:50 AM
  6. Similar cell count?
    By taylorrandalls in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-03-2007, 03:03 PM
  7. [SOLVED] How can I count similar word in raw?
    By Pinakeen Patel in forum Excel General
    Replies: 1
    Last Post: 03-09-2005, 05:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1