+ Reply to Thread
Results 1 to 5 of 5

Removing Subtotals for Measure in Power Pivot

  1. #1
    Registered User
    Join Date
    10-30-2018
    Location
    ohio
    MS-Off Ver
    2016
    Posts
    6

    Exclamation Removing Subtotals for Measure in Power Pivot

    I am trying to add a text field into my Power Pivot table. To do this I created a measure and used the DAX formula:

    =IF(COUNTROWS(VALUES(Table1[Field]))>1,BLANK(),VALUES(Table1[Field]))

    This returns the right values for me BUT rows with only one value display that value in the subtotal. Is there a way around this? I know I could apply a conditional format formula but I would like to stay away from doing that and write it somewhere into the formula or something else I'm not thinking of.

  2. #2
    Valued Forum Contributor
    Join Date
    09-25-2015
    Location
    Nowy Tomysl, Poland
    MS-Off Ver
    2019, O365
    Posts
    398

    Re: Removing Subtotals for Measure in Power Pivot

    No attachment and no visualization of the expected result.
    Forgive me, but we will not guess what you expect.

  3. #3
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent SAC
    Posts
    8,885

    Re: Removing Subtotals for Measure in Power Pivot

    Maybe you want HASONEFILTER.
    Rory

  4. #4
    Registered User
    Join Date
    10-30-2018
    Location
    ohio
    MS-Off Ver
    2016
    Posts
    6

    Re: Removing Subtotals for Measure in Power Pivot

    I will explain further.

    I am trying to sort employee IDs by Office and then Staff Level code subheadings. There are several columns of billing data in the values field area and then 3 columns of text values I need to add in at the end of the field area (This is how my boss wants it or I would just drag them into the 'Row' field and put them in the beginning and call it a day). The text values are Status, Dates(Text Formatting), and Notes/Comments.

    With the DAX formula =IF(COUNTROWS(VALUES(Table1[Status]))>1,BLANK(),VALUES(Table1[Status]))

    I was able to create a measure to display those text values. The problem is for some office and staff levels there is either only one employee or a couple employees with the same status description which causes the subtotal to display that text value. Ex: I have 3 employees under Cleveland Office-Staff Code 60 that are all listed as Active...This makes the subtotal display an 'Active' value instead of blank like other offices and staff codes with several employees and varying descriptions.

    I wanted to know if there was something I could put into the DAX formula to 'guard' the original formula or keep it from displaying in the subtotals. I was trying to stay away from the conditional format custom number format ";;;" way because they prefer I write it into the formula if possible.

    I attached a screenshot of just the subheadings and 'Status' column and where it's displaying a value in the subtotal section to get the general jist of it.capture.PNG

  5. #5
    Registered User
    Join Date
    10-30-2018
    Location
    ohio
    MS-Off Ver
    2016
    Posts
    6

    Re: Removing Subtotals for Measure in Power Pivot

    I forgot to add to this sooner but I wanted to thank, rorya. I didn't know anything about the newer filtered options until you mentioned it. I ended up with:

    =IF(ISFILTERED(Table1[ID]),VALUES(Table 1[Status]),BLANK())

    Had to play around with the formula for a little bit to get it just right but took care of my problem right away once I got it!

+ 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. Power Pivot: Adding a measure to a Pivot Chart
    By jlt199 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 12-22-2017, 12:40 PM
  2. [SOLVED] Power Pivot Measure so I can put a text field in If condition is not true
    By rv02 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 01-06-2016, 08:59 AM
  3. Replies: 0
    Last Post: 12-04-2015, 11:31 AM
  4. [SOLVED] Help Needed with Power Pivot Calculate Measure
    By rv02 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 05-13-2015, 10:09 AM
  5. [SOLVED] Create a measure in Power Pivot to divide by value in subtotal row of the PP
    By rv02 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 04-22-2015, 11:22 AM
  6. [SOLVED] RANK.EQ Function in Power Pivot Measure
    By rv02 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 03-16-2015, 04:26 PM
  7. Excel Power pivot measure
    By eajustin15 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 12-12-2013, 05:16 PM

Tags for this Thread

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