+ Reply to Thread
Results 1 to 7 of 7

how to calcuate data (simple divsion)BUT data changes w/ slicers

  1. #1
    Forum Contributor
    Join Date
    06-28-2013
    Location
    usa
    MS-Off Ver
    Excel 2013
    Posts
    192

    Question how to calcuate data (simple divsion)BUT data changes w/ slicers

    Top table - each month has data for each row label (Admit, FU, DC, etc..)

    Bottom table - this is where I want to calculate a percentage for each value above.


    Basically I am looking for monthly averages for each value from the top chart and have it reflect in the bottom chart.


    Example,

    In October for "admit" there were 388. Now, I want to take that 388 divided by 31 (days in October) and have it reflect in B17 and do the same for the rest. Sounds simple right =B5/31? BUT, you will notice slicers in the upper right hand corner. As you click on those "buttons" it changes the data in the top table. If you click on "non teaching" they dont have any data for "consult op". Basically the row lables may change depending on clicking on the slicer.

    I thought of using sumifs (then divide at the end) but it looks like it doesn't like using criteria thats horizontal and vertical. Any suggestions?

    Capture.PNG
    Last edited by eeps24; 06-19-2017 at 01:13 PM.

  2. #2
    Forum Contributor
    Join Date
    07-13-2015
    Location
    Quebec, Canada
    MS-Off Ver
    2013
    Posts
    232

    Re: how to calcuate data (simple divsion)BUT data changes w/ slicers

    I'm not sure why sumifs would not work if it works in a pivot table. What do you mean by "it doesn't like using criteria thats horizontal and vertical"? You could upload an example to help if you can

  3. #3
    Forum Contributor
    Join Date
    06-28-2013
    Location
    usa
    MS-Off Ver
    Excel 2013
    Posts
    192

    Re: how to calcuate data (simple divsion)BUT data changes w/ slicers

    for example, try do sumifs in B17. I tried...

    =SUMIFS(B5:B13,A5:A12,"Admit",B4:I4,"October") but came up with #value

  4. #4
    Forum Contributor
    Join Date
    07-13-2015
    Location
    Quebec, Canada
    MS-Off Ver
    2013
    Posts
    232

    Re: how to calcuate data (simple divsion)BUT data changes w/ slicers

    Using sumifs directly in the pivot table won't solve the issue, it will still change whenever you update it.

    However, I am not entirely sure what is your problem here. Are you worried that the slicers could be updated which would change your results, which you don't want to? In that case you could use SUMIFS directly in the data that feeds your pivot table.

    Otherwise, I don't understand the question

  5. #5
    Forum Contributor
    Join Date
    06-28-2013
    Location
    usa
    MS-Off Ver
    Excel 2013
    Posts
    192

    Re: how to calcuate data (simple divsion)BUT data changes w/ slicers

    I apologize, let me try to clarify....

    Example, the cells in the bottom table, I want all these to reference to the corrospoinding cells in the top table. (B18:B23 to corrospond to B5:B11). When no filters (slicers) are clicked, everything looks fine.

    However, not everyone has data for october, novemeber and so forth. Example, perdiem do not have any admits for oct/nov. So if I click on "per diem", cell B5 (oct data) now turns in to Nov data and ruins my B18=B5/31.

    Before I click slicer
    B18=B5/31 gives me a value of 12.51

    After I click slicer
    B18=B5/31 gives me a value of 0 (should not be zero). Because October disappears, its as if it tied to only october. I want these cells to be dymanic.

    Not sure if I am explaining myself correctly.

  6. #6
    Forum Contributor
    Join Date
    07-13-2015
    Location
    Quebec, Canada
    MS-Off Ver
    2013
    Posts
    232

    Re: how to calcuate data (simple divsion)BUT data changes w/ slicers

    Hi,

    That seems weird, or perhaps I don't understand. As I understand it, you choose Perdiem, and cell B4 becomes "December", right? In that case, the formulas below should not change if the formula really is "B5/31". Are you sure you are not getting formulas with GETPIVOTDATA?

  7. #7
    Forum Contributor
    Join Date
    06-28-2013
    Location
    usa
    MS-Off Ver
    Excel 2013
    Posts
    192

    Re: how to calcuate data (simple divsion)BUT data changes w/ slicers

    yes originally I was getting "getpivotdata" but thats when i started typing in the actual cell reference. I solved my own problem, I had to increase the number of digits in the cell.

    thank you

+ 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] Excel Slicers to list data on different sheet
    By dluhut in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-15-2016, 11:16 AM
  2. How to connect slicers from different source of data, VBA code
    By Na2000 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 04-17-2016, 08:40 PM
  3. Synchronising slicers with different source data
    By burger160 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-20-2016, 07:26 PM
  4. VBA Code for multiple Slicers from different data sets
    By Pinky121 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-02-2015, 12:02 AM
  5. Slicer filters don't work properly
    By BDD2015 in forum Excel General
    Replies: 1
    Last Post: 05-22-2015, 12:51 AM
  6. Synchronize Slicers with multiple data sources
    By dkjhn in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-22-2015, 02:56 PM
  7. Having slicers also filter a main data sheet
    By manzier in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-31-2014, 12:29 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