Results 1 to 5 of 5

Power Query count occurrences of specific character in column

Threaded View

Imbizile Power Query count occurrences... 12-29-2020, 07:23 AM
AliGW Re: Power Query count... 12-29-2020, 07:29 AM
Bo_Ry Re: Power Query count... 12-29-2020, 07:33 AM
AliGW Re: Power Query count... 12-29-2020, 07:47 AM
Imbizile Re: Power Query count... 12-29-2020, 08:08 AM
  1. #1
    Forum Contributor
    Join Date
    04-30-2010
    Location
    Denmark
    MS-Off Ver
    Office 365
    Posts
    215

    Power Query count occurrences of specific character in column

    Hello all

    Im would like to add a column to a table, that counts the number of occurrences of the specific character | in another column, like this:
    CountOccurrencesInColumn.png


    As I understand from this post, I should be able to do this in by adding a calculated column with this:
    AllCount = LEN(Tabel1[All])-LEN(SUBSTITUTE(Tabel1[All],"|",""))
    But I cant figure out how to actually apply that - if I just write it in the Power Query M code it gives errors.

    How can I add this column in Power Query?

    Please note that I only have up to 2 occurrences in the sample, but in my actual setup I have more than 150 in some rows.

    Best regards
    Imbizile
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Power Query/Power Pivot Conditional Column creation & chart
    By mz_h in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-12-2020, 06:07 PM
  2. Replies: 10
    Last Post: 06-25-2020, 12:19 AM
  3. Custom Permutations Column in Power Query from two columns in the same Query
    By PaintPaddy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-11-2019, 02:48 PM
  4. Remove Special Character within Power Query
    By excelnovice19 in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 03-09-2019, 11:38 PM
  5. [SOLVED] Power Pivot does not load new column added in Power query
    By ibuhary in forum Excel General
    Replies: 12
    Last Post: 02-19-2019, 03:53 AM
  6. Sub-Forum for Excel Power Tools (Power Query, Power Pivot & Power BI)
    By chullan88 in forum Suggestions for Improvement
    Replies: 10
    Last Post: 06-28-2018, 02:25 PM
  7. [SOLVED] Need Help: how to count occurrences of a text character in a range
    By leemanns in forum Excel General
    Replies: 7
    Last Post: 05-05-2012, 01:51 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