+ Reply to Thread
Results 1 to 4 of 4

SumColumn Twice based on Criteria

  1. #1
    Registered User
    Join Date
    11-12-2019
    Location
    New York
    MS-Off Ver
    2016
    Posts
    16

    Question SumColumn Twice based on Criteria

    Hi All -

    I have a cube report where I sum sales figures based on various criteria, however, for some reason when the gross sales amount and the net sales amounts are lumped together and thus far I have been adding a sales type budget to filter between gross and net.

    I'm building a report, driven by this cube report, that require a column for gross and net sales shown simultaneously. This is where i am hitting a roadblock as I'm unsure how to do so.

    I was thinking of adding two measures, each summing YTD Sales (the combined sales figures) if the Sales type is either "Gross" or "Net".


    This is what I have so far: SUM(IFF([Sales Type].[Sales Type]="Gross",[Measures].[YTD Sales],0) and SUM(IFF([Sales Type].[Sales Type]="Net",[Measures].[YTD Sales],0) but I keep on getting an error.

    Any help would be greatly appreciated.

  2. #2
    Valued Forum Contributor
    Join Date
    01-14-2013
    Location
    Austria
    MS-Off Ver
    2016 / 2019
    Posts
    339

    Re: SumColumn Twice based on Criteria

    you write
    ...if the Sales type is either "Gross" or "Net"...
    this means that values should be added if they meet the either/or criteria but you used
    Please Login or Register  to view this content.
    which is a logical operator.
    there is a SUMIF function you can use (SUMIF(range, criteria, [sum_range])) and you have to add "+" them
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    11-12-2019
    Location
    New York
    MS-Off Ver
    2016
    Posts
    16

    Re: SumColumn Twice based on Criteria

    Thanks for the response gue2013. I don't think this is what I was looking for as far as I know, there are no SUMIF/SUMIFS functions for calculated pivot field.

    Also to rephrase I'm not trying to get a combined total between gross and net, actually the opposite. The dataset combines gross+net and I am trying to great a measure that separates gross sales and net sales.

  4. #4
    Valued Forum Contributor
    Join Date
    01-14-2013
    Location
    Austria
    MS-Off Ver
    2016 / 2019
    Posts
    339

    Re: SumColumn Twice based on Criteria

    oh, I misunderstood. Therefore it is always good to provide a simple sample file with anonymous data

+ 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. [SOLVED] Values based on multiple criteria including grouped criteria
    By adsako in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 03-21-2020, 01:24 PM
  2. Replies: 4
    Last Post: 09-02-2019, 04:14 PM
  3. VBA Macro Dividing Values Based upon Matching Criteria and Description Criteria
    By pvsvprasad in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 09-18-2016, 12:39 PM
  4. Replies: 0
    Last Post: 05-02-2016, 07:59 AM
  5. Replies: 2
    Last Post: 10-10-2015, 02:22 AM
  6. Replies: 4
    Last Post: 01-08-2013, 12:37 PM
  7. MACROS: Sort by multiple criteria - Create tabs based off of criteria
    By svineyard in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-21-2009, 10:48 AM

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