+ Reply to Thread
Results 1 to 5 of 5

Using Len function in pivot table as calculated field to filter data

  1. #1
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,942

    Using Len function in pivot table as calculated field to filter data

    Hi Guys,

    i have source table which i am downloading from external workbook.
    I can not change the table:

    What i am doing i am refreshing pivot table to get uniques list in the most efficient way.
    Problem is that i have to filter Key and Key2 based on number of characters.
    Perfect solution would be to add calculated field into pivot and just filter it.

    But i have read that is not possible.
    How to do workaround?

    Writing code will be not that fast as pivot table to add calculated field...

    Please help,
    attachment i added.

    Best,
    Luke
    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: Using Len function in pivot table as calculated field to filter data

    Not with calculated field but with Power Pivot DAX

    Change field name Key2 to Key_2.
    Key2 is reserve for column KEY row 2

    Insert Pivot and check add this data to the data model

    Add measure

    LenKey

    Please Login or Register  to view this content.
    LenKey2
    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,942

    Re: Using Len function in pivot table as calculated field to filter data

    this is awesome!!

    thank you very much Bo_Ry.

    Key2 is reserve for column KEY row 2
    Can you please explain more ? How this is working ?

    Best,
    Jacek

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

    Re: Using Len function in pivot table as calculated field to filter data

    Quote Originally Posted by jaryszek View Post
    Can you please explain more ? How this is working ?
    This will take 14 hours
    https://www.youtube.com/playlist?lis...gRufZ8nmB6iyr-

  5. #5
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,942

    Re: Using Len function in pivot table as calculated field to filter data

    Ok great,

    i will watch it,

    thanks!

    Jacek

+ 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. Pivot table - Calculated field for the data in rows.
    By 99problems in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 04-21-2016, 03:57 AM
  2. [SOLVED] Calculated Field in Pivot Table, Not Returning Correct If Function
    By egarcia7 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-09-2016, 12:49 PM
  3. Replies: 2
    Last Post: 06-02-2014, 10:50 AM
  4. Calculated pivot table field using pivot table data in calculation
    By BrittleStar in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 12-10-2012, 05:35 PM
  5. Replies: 2
    Last Post: 11-05-2012, 11:32 AM
  6. Replies: 0
    Last Post: 06-26-2012, 09:06 PM
  7. pivot table calculated field with user function
    By puff in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-24-2006, 06:00 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