Help to speed up CALCULATE formula

I am building a reporting system of production profiles for a set of assets. The key data structure is as follows:
Version  Field               Action    Profile          Date          Production     RiskCategory
v1          Field1         Action00    00_Low      31/1/2014        5000         1
v1           Field1         Action00    00_Low     28/2/2014         4980        1
v1           Field1         Action00    00_Low     31/3/2014          4950       1
v1           Field1        Action00      00_Base     31/1/2014        5300       2
v1           Field1        Action00      00_High     31/1/2014         5600      
3
v1           Field1        Action01      01_Low     31/1/2014        8000        
1
 v2           Field1         Action00    00_Low    31/1/2014          2000         1
Ie. the data consists of production profiles. Each [Version] has many [Field]s who in turn have many [Action]s who in turn have a High, Base, Low [Profile]s who in turn have a [Production] for each [Date].
Data size:
Each profile has a monthly entry from 2014 to 2034. There are typically 10 Actions per field, and maybe 4 fields per version. So number of rows per version is: 12months*30years*3profilesperaction*10actions*4fields = 43200. Number of versions per data set
is not decided yet, however as time goes by there will be a steady increase in nr of versions... it all depends on the speed and practicality.
Related tables:A related table (on Version and Profile) adds [Risk Category] to the [Profile] (and other attributes not relevant here. There is also another related table on [Version] [Field] [Date] not relevant here.
Problem Description: I use PowerPivot to tie 3 tables togetether via composite keys (calculated column = [Version]&[Profile] etc). So I dont have to repeat [RiskCategory] for each date in the profile table and makes QCing inputs far
easier. The purpose of the database is to take the production profiles and slice them in different ways to satisfy different input systems.
The most challenging is that I need to calculate the incremental contribution from the Base and High  [Profiles] in each action.
Generate a calculated column that for each Date in each Action calculates:
if [RiskCategory] (thisrow) = 1, then [Production])
If [RiskCategory] (thisrow) = 2, then [Production] (where [RiskCategory]=2)  - 
                                           [Production]
(where[RiskCategory]=1)
If [RiskCategory] (thisrow) = 3, then [Production] (where [RiskCategory]=3)  - 
                                           [Production]
(where[RiskCategory]=2)
My solution below is a Calculated Column that uses Calculate Allexcept and Earlier to remember the row context. However, the calculation is a little slow: 5 sec maybe - which will get worse as I add more versions and possibly more fields with more actions.
and I would like to see if I can speed it up:
=if( Profile[RiskCategory]>1,
Calculate(SUM(Profile[Production]), Allexcept(Profile,Profile[Date],Profile[Version],Profile[Action]), Profile[RiskCategory] = Earlier(Profile[RiskCategory]))-
Calculate(SUM(Profile[Production]), Allexcept(Profile,Profile[Date],Profile[Version],Profile[Action]), Profile[RiskCategory] = Earlier(Profile[RiskCategory])-1)
,Profile[Production])
Any suggestions?
Hope this is clear.
Thanks
Lars

Thanks Avi and Greg,
I am now guessing the sluggishness is coming from the size of the pivot table that I am using:
Columns: Year, Month (ie 12X30 columns), Rows: Version, Field, Action (1x4x10), Values: 4 different measures based on production and delta prodcution. In all it makes for almost 60000 cells.
Data source queries and relationships
The data sits in tables in excel and is organized in a "star" schema to allow the users to input and maintain the data easier. ie without having to copy all the duplicate columns in a flat file. 
I use composite keys and avoid autokeys etc to avoid data entry being tedious and unintelligible. Remember these tables are used by the users to input and store production profiles.
Dax Queries I know nothing about, would they work for my set up? ie without an external sql database etc to query.
Use measure in stead of calculated column
I would like to see if I could make this a measure instead of a column. However, I am struggling to see how as I need multiple references to the current row context (hence why the ability of using Earlier() in the Calculated column was handy. Maybe a recursive
SUMX would do it?
To summarize: The calculation requires the computation between the current [production] and the [production] in the other [RiskCategoriy]s in the same context ie: same [DATE], [ACTION], [FIELD], [VERSION] 
ie: if RiskCateory is 1, just return current [production], if it is 2 or 3 then return Production (2) - Production (1) or Production(3)-Production(2) respectively (belonging to same version/field/action 
Example under of the calculated column*
Version  Field    Action    Profile          Date       Production RiskCategory   Calculation*
v1         Field1  Action00    00_Low   31/1/2014      5000         1                   5000
v1         Field1   Action00    00_Base  31/1/2014      5400        2                    400
v1        Field1    Action00    00_High   31/1/2014      6800       3                    1400
Hope this clarifies a little and I will endeavour to paste my workbook here so you can take a look for yourself.  
Thanks again!
Lars

Similar Messages

  • PLEASE HELP: PDF Forms, creating average formula for text?

    Hello,
    I really hope somone can help. I cannot find any answers to my questions on the internet, google etc.
    First time using Acrobat. Im pretty quick learning on compters however the formulas my boss has asked me to do I have no idea if they are possible.
    We have a report form for exams and each section I need to calculate the average mark for that section.
    There are 3 questions for the first section. There are dropdowns for distinction, Merit, Pass and Below pass to select for each questions.
    Please see picture attached to show you what I mean.
    I want to be able to calculate the most selected/average dropdowns selected and not count the N/A's into award1 field?
    The fields must be text and cannot be numbers.
    so for example, track 1 got a distinction, track 2 got a Merit, Track 3 got a distiction. all other fields left n/a
    is there anyway to do this also is there any way to exactly the same as above as check boxes? - please see picture attached
    I appriciate any help. I am working on a mac
    Thanks
    Lauren

    Thank you so much reply
    Yes on the dropdowns the distincion, merit, pass or below pass values are in the correct areas ready for selection. For example on the distiction row you can only drop down for distinction and so on for Merit row dropdowns etc
    Check box is the way I rather do it as its quicker, however I created the dropdown option just incase check boxes average was not possible
    On the check boxes if i select merit for rtack 1 I would just tick the box and leave the the rest of the colum blank with no ticks. So just by seeing the tick I know its in the merit section for Track 1. However I donts know if I can do an average formula for with check boxes.
    If I check boxed/slected distinction for track 1, distnction for track 2 and merit for track 3 (obvisley any box could be ticked depeneding how the exam went so need then all in the script). I would like it to then calculate the avergae mark which would be distinction in the award1 field. While the none ticked boxes or N/A fields not affecting the average.
    This is just the start to a huge form Im doing Im dreading the rest of formulas I have to do lol
    sorry if im confusing you

  • How much improvement would a RAID 0 setup help my speed?

    Hello so i do lots of HD rendering and im wondering how would a RAID0 help my render times because i thought the CPU does most of the work. anyway the drives would be 2 750 GB 7200 RPM's in RAID 0. what would be my speed increase if any?

    You should not oversimplify such considerations. The question really is, how you handle your footage and what your render settings are. This includes things like multiprocessing, naturally, but even for conventional renders it matters where and how the items are stored and what format they are in. Yes, a RAID may help, if you use lots of footage and that footage is stored on the drive, so reading the frames goes faster, but it may not necessarily help with storing the files, as only every few seconds or minutes a framer will be written. In reverse, a RAID could help, if you are outputting the same clip to different formats just by adding multiple output modules to the same render queue entry, but that one is rare. One other possible improvemnt would relate to the disk cahe, but it's really mostly only relevant for RAM previews. It also becomes a question, of whether AE actualyl fills it in the first place - if your project is not structured accordingly and AE thinks, it can calculate your effects faster than reading them from the cache, it will not use the disk cache for this stuff... It's really much more complicated, so you should evaluate your options based on the pointers I tried to give you.
    Mylenium

  • Help! Newbie Assistance With Formulas!

    I am an admitted Newbie.  I'm fairly good with Excel - but switching to Numbers on my new iMac is making me nuts!
    I'm trying to do something really simple - but getting nowhere.  Apparently, from what I've read - there is a learning curve in working with Dates & Times in Numbers that I am not at all familiar with.  So I'll explain my dilemma and hope someone can help me:
    1)   I've got an Hourly Log that shows a date (Column A), start time (Column B), end time (Col C), and duration (Col D).
    2)   I've figured out how to get the Duration calculation done.
    3)   And I've figured out how to get a sum of the Durations with a typical =sum(C7:C18) formula.
    4)   What I can't figure out how to do - is to place the Durations formula in Column D so that - if there are no hours entered on a date, it will just be blank.  This is a problem, because I need to have the spreadsheet set up to automatically calculate if hours are entered - or leave a blank cell in D if there are no hours.  I tried to set it up to go ahead and show a "0" if no hours are entered - but then that gives me an error message in the Total that says "the values being added must be either all durations or all numbers. "
    In Excel (which I know, I shouldn't be mentioning - but this is all I know so far!) -- it would be an =IF formula -- but I can't seem to make anything like that work here.
    Any assistance would be appreciated!!  I'm desperate!
    Thanks --
        Kelly

    Thank you so much for your help, Wayne!  I believe that helped me solve the calculations issue - so I'm good there. 
    But I'm still having a huge problem understanding the Date/Time conundrum!  So - let me see if I can explain what I understand on that so far:
    a)  Any time a Time value is entered in a cell, it is automatically going to include (for example) today's date.  (I did notice that when I entered a time, it would add today's date - so I'm assuming that is what you're talking about on going back to look at the contents of a cell with a time value, and I'll see what date that time value was entered - right?
    b)  Using a Custom format, even though the date is technically "there" in the cell - I can get my spreadsheet to not show that.  (which I managed to do)
    c)  But that my hours - for example, if I'm calculating hours worked between 9am - 2pm -- I need to make sure the date is the same for both (whether it's showing or not), or it's not going to calculate correctly.  Is that right?
    I haven't figured out how to format the cell as text, though - and still have it calculation the Duration . . .?   In fact, when I format it as text -- it goes back to showing the whole date/time/am/pm info.  In short......
    ARGHHHHH!
    I'm leafing through manuals as quickly as I can, but oy - the learning curve!  If you could just let me know if my understanding thus far is correct - that would help tremendously!
    Thank you again!
       Kelly

  • Help! Hyperion Planning Dimension formula no longer works after name change

    Hi,
    I am having an issue with Hyperion Planning. I recently changed an account's dimension name from ASales & Property Taxes (D) to AProperty Taxes (D). However, the original name was used in a formula of another account. When I ran my refresh I got the following error:      
    Error [1200354] detected in member formula for member "AFacilities Costs as a % of Revenue".
    So I went into planning and went to the referenced account and looked at the formula. The formula still had the old member name ASales & Property Taxes (D) so I changed the formula to the new name AProperty Taxes (D). However, when I went to validate the formula I got the following error message:
    Error compiling formula for [] (line 1): expected type [NUMBER] found [STRING] (["ASales & Property Taxes (D)"]) in function []
    However, my formula has the new name not the old name. Here is my formula:
    ("AMaintenance (D)" + "AMaintenance (SG&A)" + "ANon Cap Equipment & Rentals (D)" + "ANon Cap Equipment & Rentals (SG&A)" + "AOperating Leases (D)" + "AOperating Leases (SG&A)" + "ARent & Occupancy Costs (D)" + "ARent & Occupancy Costs (SG&A)" + "AProperty Taxes (D)" + "AProperty Taxes (SG&A)" + "ASecurity (D)" + "ASecurity (SG&A)" + "AInsurance (D)" + "AInsurance (SG&A)")/ARevenue;
    Does anyone know how to fix this problem? Please help, as a result of this issue none of my accounts or clients are getting pulled into the Balance Sheet causing it to not tie with Oracle :( Thanks!!

    Hi,
    What happens if you try and refresh with updating the formula to reference the correct name?
    You won't be able to validate the formula because the member does not yet exist in essbase until the refresh has completed.
    If you have problems you could always, remove the formula and store it, refresh so the new member gets created, then put the formula back and refresh again.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Latency in Dreamweaver CS5 ... help me speed it up ...

    I hope someone can help me because this is driving me crazy. I was using CS3 for 3 years now and
    it worked beautifully, but my company made me update ot CS5 today. This runs so slow and when I start typing the code
    or select code from another document there this latency. I am using windows so I tried increasing the priority of the process application to "high", but nothing has worked. There must be something that can be done as this is intollerable.... BTW, I tried to call Adobe for help but they gave me the run around and were of no use whatso ever. Has anyone else ran into this issue and fixed it?

    Maybe if someone can tell me how to disable the service that validates my code for errors? I think that might speed things up. The validation of the code is cool and all, but I like to write the code myself and find my own errors. If I can't find it then I want to be able to turn it back on and search, but not automatically in real time ..... that is horrible.

  • Yet again help re speed problem

    First todays stats
    ADSL line status at 1359 on 01/04/11
    Connection Information
    Line state Connected
    Connection time 0 days, 00:00:19
    Downstream 1,151 Kbps
    Upstream 888 Kbps
    ADSL Settings
    VPI/VCI 0/38
    Type PPPoA
    Modulation G.992.5 Annex A
    Latency type Interleaved
    Noise margin (Down/Up) 23.1 dB / 14.4 dB
    Line attenuation (Down/Up) 21.6 dB / 4.6 dB
    Output power (Down/Up) 20.2 dBm / 1.3 dBm
    Loss of Framing (Local/Remote) 0 / 0
    Loss of Signal (Local/Remote) 0 / 0
    Loss of Power (Local/Remote) 0 / 0
    FEC Errors (Down/Up) 0 / 0
    CRC Errors (Down/Up) 0 / 64
    HEC Errors (Down/Up) 7 / 0
    Error Seconds (Local/Remote) 0 / 0
    Hub v2 is connected to filtered master socket. SN and attenuation figures look good to me but download speed is 597 Kbps.
    Speedtester shows dsl set at 1151 and ip profile at 750. Is this the cause of disconnections?
    Have had BT Engineer visits but no improvement
    Anyone any idears please
    Keith
    Solved!
    Go to Solution.

    Imjolly
    Thanks for the reply - nice to hear/speak again
    Yes hub has to be reset 2/3 times per day. so far today at 1030 / 1400 and 1730. The info I was working from off another site is
    Noise ratio. The higher the number the better for this measurement. In some instances interleaving can help raise the noise margin to an acceptable level.
    6dB or below is bad and will experience no synch or intermittent synch problems
    7dB-10dB is fair but does not leave much room for variances in conditions
    11dB-20dB is good with little or no synch problems* (but see note below)
    20dB-28dB is excellent              Mine whis is why I said good
    29dB or above is outstanding
    Line Attenuation
    Measure of how much the signal has degraded between the DSLAM and the modem. This is largely a function of the distance from the exchange. The lower the dB the better for this measurement.
    20dB and below is outstanding
    20dB-30dB is excellent            Mine which is why I said good
    30dB-40dB is very good
    40dB-50dB is good
    50dB-60dB is poor and may experience connectivity issues
    60dB or above is bad and will experience connectivity issues "
    Do you have other figures?

  • Idiot needs help increasing speed of motion template "blizzard".

    I need to overlay some snow over an existing shot done on exterior location with snow machines.
    I've found the "blizzard" setup in motion and, since I really don't know motion at all, I want to ask if a kind expert out there can help me simply on how to speed it up, so that the snow falls/moves faster.
    Please understand that I can't learn "Motion" in order to do this one effect and I'd appreciate it if you guys and gals would not berate me for being so lazy as to ask for your help on this one issue.
    Many thanks if you can and will help,
    Best wishes,
    An idiot,
    Harry

    This is just an FYI on forum use - Please click on the or buttons over posts as appropriate - you not only reward those who answer your questions, but point future readers to where you found your answers...
    Patrick

  • Help getting speed back up above 2mb???

    I had my bt vision installed a few months ago and it was working fine til recently. The engineer that installed it said my speed was borderline and it was sitting at 2.4mb. But now it has dropped below 2mb and im getting the v04 message when i try to play my on demand.
    Someone suggested i ask here on how to get my bb running faster again.
    Anyone got any suggestions???
    Thanks in advance.
    Solved!
    Go to Solution.

    I had broadband in the pre hub days so never had one to enable me to hep but I saw on other postings that the hub may have two passwords on it, one is wireless, one is admin pages. Also saw mention that the passwords are case sensitive. Others have has issues and had to reset the hubs but that would means you lose all altered settings I believe.
    If my post was helpful then please click on the Ratings star on the left-hand side If the the reply answers your question fully then please select ’Mark as Accepted Solution’

  • HELP: Controlling speed of photo slider

    I need some help in controling the speed of this simple photo
    slider. Here's what I have.
    Individual movie clip(Photo):
    onClipEvent (enterFrame) {
    _root.xdist = (_root._xmouse-_root.xcenter)/20;
    Main Action:
    movieWidth = 300
    xcenter = movieWidth/2
    // this code loops right
    function movePiece (target) {
    with (target) {
    _x += xdist;
    if (_x>movieWidth+_width/2) {
    _x = -_width/2;
    if (_x<(0-_width/2)) {
    _x = movieWidth+_width/2;
    What action code, etc. can I put into this code to slow down
    the scrolling or control the scroll speed? Any help would be
    appreciated! Thanks

    Thanks, I can't believe I missed that. That worked. The
    higher the # the slower.
    Thanks-B

  • I have an iMac G5 OS 10.4.11  OS 9 is also installed.  Can I remove OS 9 safely?  Will this help my speed?

    Two questions -
    I have an iMac G5 with OS 10.4.11.  OS 9 is also on the computer.  Can I safely remove OS 9?  Will removing it help my processing speed?

    If you remove OS 9, all Classic applications will fail to run, as shown by the System Profiler in the Applications or Applications -> Utilities folder:
    Not running Classic will speed Mac OS X application speed, but you needn't remove the system folder, or the Applications Mac OS 9 folder.  You just need to make sure Classic is not running in Apple menu -> System Preferences -> Classic, and is shut down if it is running.  Removing the System Folder with the Finder and System files and the Control Panels folder will disable Classic as well.   I would only do so, if you are sure oyu never need a Classic application again.
    Upgrading to Mac OS X 10.5 will stop you from being able to use Classic in any case.

  • Help w/speed/settings of EA4500

    I'm a newbie in re: to setting up a router/modem etc. I purchased the EA4500 as a replacement for my all in one AT & T router/modem. I was impressed with the reviews of the linksys EA4500 and the good reviews. However, my speeds are slow and the perfomance is nowhere near the cheap combo unit that i had from AT &T. I must not have the 4500 set up correctly.
    I'm running DSL, i downloaded the latest linkysys smart wi-fi upgrade utility today (7/27/13) and just used whatever settings it installs. This didn't change a thing with the performance. 
    i use my EA4500 for streaming HD movies in one room, kids playing PS 3 online in other room, occasional checking of email on ipad. PS3 gets lots of "lag" during gameplay, streaming HD movies - goes in & out of HD.
    my speed tests using "myspeedmeter.net" discloses: download 2.83 mbps, upload 0/29 mbps
    Any ideas or suggestions of things i can check? Again, i'm a newbie at this and certainely appreciate any help you can give. tks. 

    Since you upgraded the firmware of the router today, do a reset on it and reconfigure it from scratch. Is the internet speed slow in both wired and wireless? You may try to lower the MTU size on the router. You may try to change the wireless channel as well like on the 2.4 GHz to 1, 3, 6, 9, or 11 and use WPA2 for security. I hope those will help.
    Title: Determining and setting up the correct MTU size Article ID: 386
    http://kb.linksys.com/Linksys/ukp.aspx?vw=1&docid=fbf8e8564632422eaa8ea80bf9dcba64_386.xml&pid=80&re...

  • Please help,My speed has more than halved.

    Hi
    I have a 20mb line which i usually get about 10mb off,it has recently dropped to 1.5mb,and  everything is freezing and buffering here are my stats.Any help is greatly appreciated.
    Connection information
    Line state
    Connected
    Connection time
    0 days, 3:25:06
    Downstream
    2,272 Kbps
    Upstream
    1,050 Kbps
    ADSL settings
    VPI/VCI
    0/38
    Type
    PPPoA
    Modulation
    ITU-T G.992.5
    Latency type
    Interleaved
    Noise margin (Down/Up)
    32.0 dB / 5.5 dB
    Line attenuation (Down/Up)
    31.0 dB / 16.4 dB
    Output power (Down/Up)
    20.8 dBm / 12.4 dBm
    Loss of Framing (Local)
    26
    Loss of Signal (Local)
    2
    Loss of Power (Local)
    0
    FEC Errors (Down/Up)
    168 / 72
    CRC Errors (Down/Up)
    0 / N/A
    HEC Errors (Down/Up)
    N/A / 130313
    Error Seconds (Local)
    2

    Hi you have a very high noise level which is what is causing your low speed i suggest you try these first Have you tried the quiet line test? - dial 17070 option 2 - should hear nothing - best done with a corded phone. if cordless phone you may hear a 'dull hum' which is normal
    also you could try the hints given by poster RogerB in this link they may help http://community.bt.com/t5/BB-in-Home/Poor-Broadband-speed/m-p/14217#M8397
    Then someone here may be able to help and offer more advice.
    This is a customer to customer self help forum the only BT presence here are the forum moderators
    If you want to say thanks for a helpful answer,please click on the Ratings star on the left-hand side If the reply answers your question then please mark as ’Mark as Accepted Solution’

  • Need help with a Numbers (ISBLANK) formula

    Having trouble with a cell formula that tests 2 cells for blank condition.
    I want to sum 2 cells only if they are BOTH blank.  (Trying to eliminate the
    "0" in the sum cell if both test cells are blank.)
    I've tried using ISBLANK, AND, IF functions but no success.
    Would appreciate your help on this. Thank you.

    Hi there.
    Perhaps due to my bad english, I could not understand your question, but I want to help, anyway.
    The question is: why would you want to sum two blank cells? Or what you want is to sum two cells IF two different cells are blank?
    Best regards,
    Otávio

  • Please help with speed issues and powerline adapte...

    Hello all,
    I have had infinity for a few months now and I am very unhappy with the quality of service so far, I wont go into that however,
    the problems I currently have are:
    speed dropped from 76.8Mbps down to 34.6Mbps within a week of going live, they have replaced my HH3 twice to try and remedy this but its still the same, anything you can recommend?
    as for the powerline adapters, i bought 2 extra when I took out my infinity package, all 4 have failed twice, they have been replaced aswell, received a new set this morning to install and they don't work!
    When I set them up I get the green data light and green power light, however once I plug the Ethernet cables in, the data lights go off after around 10sec,
    no matter how many times I reset and marry them its the same output, then maybe they will work for around 10-15 minutes and then go off again.
    I have 4 adapters in use ATM
    2 for vision and 2 for my computer 
    bt sent me 2 different models for some reason
    I have the white simpler networks ones, 2 have black writing and 2 have orange,
    sorry for the essay but from the experience I have had from BT so far I am not impressed
    thankyou for any help in advance
    regards  

    Ratty2012 wrote:
    The 200mbps refers to the theoretical duplex speed and not the actual connection speed. In ideal conditions the actual is about 70 to 80mbps for the 200 adapters. So therefore most of the time in normal conditions they connect at a much lower speed.
    That's what I meant, hence why would you get 500Mbps ones if they ain't going to reach unless you're going to have your house wiring upgraded if the speed is rubbish. Didn't mean to be rude xD
    If this helped you please click the Star beside my name.
    If this answered your question please click "Mark as Accepted Solution" below.

Maybe you are looking for