Need help regarding complex calculation using Max value and limiting data after Max date in MDX

I am working on a bit complex calculated measure in SSAS cube script mode.
Scenario /Data Set
Date
A
B
C
A+B
5/29/2014
Null
34
Null
34
6/30/2014
Null
23
45
68
7/15/2014
25
-25
Null
0
8/20/2014
-34
Null
Null
-34
9/30/2014
25
Null
60
25
10/15/2014
45
-45
Null
0
11/20/2014
7
8
Null
15
a) Need to capture latest non-null value of Column C based on date
with above example it should be 60 as of 9/30/2014
b) Need to capture column A+B for all dates.
c) Add values from column (A+B) only after latest date which is after 9/30/2014. 
with above example it's last 2 rows and sum is 15
d) Finally add value from step a and step c. which means the calc measure value should be = 75
I need to perform all this logic in MDX. I was able to successfully get step a and b in separate calc measure, however i am not sure how to limit the scope based on certain date criteria. In this case it's, date> Max date(9/30/2014) . Also how should
i add calculated members and regular members?
I was able to get max value of C based on date and max date to limit the scope.
CREATE MEMBER CURRENTCUBE.[Measures].[LatestC] AS
TAIL( 
  NONEMPTY(
    [Date].[Date].CHILDREN*[Measures].[C]),1).ITEM(0) ,visible=1;
CREATE MEMBER CURRENTCUBE.[Measures].[MaxDateofC] AS
TAIL( 
  NONEMPTY(
    [Date].[Date].CHILDREN,[Measures].[C]),1).ITEM(0).MemberValue ,visible=1;
Please help with Scope statement to limit the aggregation of A+B for dates > MaxDateofC? Also further how to add this aggregation value to LatestC calc measure?
Thank You

Hi Peddi,
I gave TRUNC to both of the dates. But still the same issue. I think the problem is in returning the BolbDomain.
return blobDomain;
} catch (XDOException xdoe) {
System.out.println("Exception in XDO :");
throw new OAException("Exception in XDO : "+xdoe.getMessage());
catch (SQLException sqle) {
System.out.println("Exception in SQL :");
throw new OAException("SQL Exception : "+sqle.getMessage());
catch (OAException e) {
System.out.println("Exception in OA :");
throw new OAException("Unexpected Error :: " +e.getMessage());
Thanks and Regards,
Myvizhi

Similar Messages

  • Need help regarding Issues while use T=0/T=1 Protocol

    Hi Friends..
    I developed an Simple Applet to be Personalized by Datacard Machine..
    This Applet is downloaded and installed in 2 difference protocol, (T=0 and T=1)..
    This is a little description of my Applet :
    CLA used is (byte) 0x80, otherwise SW 6E00 returned
    INS (byte) 0x20 : is used for Ingoing Command (To Send Data to Applet)
    INS (byte) 0x30 : is used for Outgoing Command (To Get Data From Applet)
    P1 = (byte) 0x00 : is used to Send Data and Get Data for field Employee code
    Case T=0 :*
    I tried to send this APDU through Datacard Machine :
    80 20 00 00 05 01 02 03 04 05 00
    the SW resulted is 90 00
    After that i tried to send this APDU through Datacard Machine :
    80 30 00 00 00
    There's no Response Data, and the SW resulted is 61 08
    But, if i try to Get Data using SmartCardIO, i can get Data as i want, and the SW is 90 00
    What is the meaning of SW 61 08?
    I think this SW tells me that there's 8 bytes remaining data (but i don't know whether this is correct)..
    But in the Case T=1 Protocol :*
    I did the same thing, and there's no error returned..
    i can Read an Write without any error..
    Please correct me if i'm wrong..
    Any help would be appreciated..
    Thanks
    Edited by: Leonardo Carreira on Oct 27, 2010 7:49 PM
    Edited by: Leonardo Carreira on Oct 28, 2010 6:22 PM
    Change the title

    Leonardo Carreira wrote:
    After that i tried to send this APDU through Datacard Machine :
    80 30 00 00 00
    There's no Response Data, and the SW resulted is 61 08
    But, if i try to Get Data using SmartCardIO, i can get Data as i want, and the SW is 90 00 The datacard machine may not handle the GET RESPONSE apdu for you. SmartcardIO does this transparently.
    What is the meaning of SW 61 08?SW '61XX' = SW2 encodes the number of data bytes still available. This is because you are using T=0.
    I think this SW tells me that there's 8 bytes remaining data (but i don't know whether this is correct)..That is correct
    But in the Case T=1 Protocol :*
    I did the same thing, and there's no error returned..
    i can Read an Write without any error..This is due to the differences between T=0 and T=1 protocols. T=1 will send you a response containing the data, T=0 will send you the numbder of bytes it expects to return and waits for a GET RESPONSE before sending you the data. As mentioned above, SmartcardIO handles this for you transparently while other libraries mat not (RAW PC/SC does not). You can read more about this in ISO7816-3
    Cheers,
    Shane

  • Hi guys please I need help basically I was using my ipad and decided to download an app I clicked it and hit install and the circle thing started moving but it just stopped and the app said free please I need help

    Guys I was using my ipad today and I decided to install an app so I started it and the circle came and it stopped and the app again said free
    And my App Store turned Chinese
    And when I tried to make a new Apple ID it gave me a warning you might be connected to a server pretending to be buy.iTunes.com at put your private information at risk
    PLEASE help me!!

    Your friend and whomever they talked to are wrong.  That message occurs when your device is locked to another carrier, and only that carrier can authorize an unlock request.
    Apple does not unlock devices for consumers - they merely process unlock requests submitted by authorized carriers.  Your friend needs to contact his carrier and request an unlock for that phone, assuming the carrier offers unlocking (not all do nor are they required to).
    See Apple's own documentation - http://support.apple.com/kb/ht5014

  • Need help solving Error 3005 using activex server and automation open.

    Hi,
    I am trying to use a master vi to call a slave vi by using the activex server option. The steps i have taken are:
    1. In the slave vi, go to advanced tab in build options and check enable activex server.
    2. After building the .exe go to the command prompt and type the path to the .exe followed by /RegServer. Ex: C:\slavevi\applicatoin.exe /RegServer. This will add it to the activex plugin list.
    2.a restart labview if it was open.
    3. In the master vi use automation open, create a constant for the automation refnum and right click it. Select browse. Browse to the name you chose in the enable activex server field from step 1. Choose “show creatable objects only” and pick the _application one.
     4. use an invoke node and connect automation open to it. Choose getVIReference. This will drill down to the actual vi you want to control.
    5. The path will be the install path + the vi name. Ex: \slavevi.exe\mainviname.vi.
    These steps actually worked on the machine that I built the vis on but if I build the exes and transfer them to another computer I get error 3005 when it tries to open the slave.exe program. In each instance the master and slave vis are both local (not trying to go through a network or anything). I have registered the slave.exe and .tlb file on the new computer, rebooted etc and nothing seems to work. I also tried running the master vi as source code but that didn't work.
    The master vi was originally built in labview 7.1 and the slave is built in LV 9.01 but I have since upgraded the master vi to 9.01 to try and resolve the problem.
    Is there something that happens during a build that needs to be replicated on the new computer?
    Thanks for any help.
    Solved!
    Go to Solution.

    Help needed ..
    am also getting this error 3005 in automation open in LV.
    i am trying to design a GPS software by integrating Google Earth Application in LV. i am successful in that. but when i am trying to use its properties like drawing a pilygon or point at particular longitude and latitude am getting error.
    I read that mass complie thing was for older LV versions.
    am using LV2009.
    Attached is the part of code thats creating trouble.
    Attachments:
    GE.JPG ‏19 KB

  • I dont  understand my plan i have applied data 4 times this week and each time it says insufficent funds i need help to know what plan to have and how to manage my data my phone is currently in insufficent status as of this morning i refilled it last nigh

    can anyone help me with knowing how to live chat with customer service

    I think you need to contact your bank....

  • I need help regarding measurement of "time domain parameters of Heart rate variability" using labview.

    I need help regarding measurement of "time domain parameters of Heart rate variability" using labview.
    I am using Labview 8 ... I  need to develop a software to accquire the ECG data (simulated enironment ) and compute the time domain parameters of Heart rate variability like "SDNN, SDANN...etc". Can some 1 plllzzzz help me out.Plzz help me if u can.Thanx in advance.

    Hi Andy,
      Thanx for responding.  The input is from a text file. SDNN, SDANN,etc are  the timedomain parameters of heart rate variability.
     SDNN: the standard deviation of the NN or RR interval  i.e. the square root of variance.
    SDANN:the standard deviation of the averageNN interval calculated over short periods, usually 5 min,which is an estimate of the changes in heart rate due tocycles longer than 5 min
    SDNN index, the meanof the 5-min standard deviation of the NN intervalcalculated over 24 h,
     RMSSD: the square root ofthe mean squared differences of successive NN intervals
    NN50: the number of interval differences of successiveNN intervals greater than 50 ms, and
    pNN50 the proportionderived by dividing NN50 by the total numberof NN intervals.
    The problem is dat I am a fresher to the world of Labview. I have jus recently started working on it. Can u please suggest me some some idea as soon as possible.
      As i said  I have the ECG data in the form of text files..I need to create sort of GUI to calculate the time domain parmeters....I need help urgently. Plzzz help me if u can. If u have and .vi example to calculate the RR interval plzz send it to me ASAP.
    Thanku

  • I would like to know how i can create a bell graph with out using sub VIs, the data that i created consists in 500 readings with values of 0 to 100, i calculated the mean value and standard diviation. I hope some one can help me

    I would like to know how i can create a bell graph with out using sub VIs, the data that i created consists in 500 readings with values of 0 to 100, i calculated the mean value and standard diviation. I hope some one can help me

    Here's a quick example I threw together that generates a sort-of-bell-curve shaped data distribution, then performs the binning and plotting.
    -Kevin P.
    Message Edited by Kevin Price on 12-01-2006 02:42 PM
    Attachments:
    Binning example.vi ‏51 KB
    Binning example.png ‏12 KB

  • Need Help regarding text Output

    Dear gurus.
    I need help regarding formatting of a text.
    I want to format a employee sub group text.
    im getting a text workers (7) from a table t503t having field ptext.
    i want to show only (7) in the output not the whole text how can i do this ?
    Please help
    regards
    Saad.Nisar

    DATA: BEGIN OF itab_odoe OCCURS 0,
      department_text LIKE t527x-orgtx,"Holds the short text for department
      department_no LIKE pernr-orgeh,
      pernr LIKE pernr-pernr,
      ename LIKE pernr-ename,
      grade like t503t-ptext,   "THIS AREA GET ME TEXT OF EMPLOYEE SUBGROUP"
    *  department_text LIKE t527x-orgtx,"Holds the short text for department
      current_year LIKE sy-datum,
      wt0001 LIKE q0008-betrg,"Basic Pay
      wt1101 LIKE q0008-betrg," COLA
      wt3002 LIKE p0015-betrg,"Overtime
      per_basic type p DECIMALS 2,"Overtime percentage on basic
      per_basic_sum type p decimals 2,"Overtime Sum Division
      overtime_sum LIKE p0015-betrg,"holds sum of overtime
      basic_sum like q0008-betrg,"holds sum of basic
    END OF itab_odoe.
    Im using the select statement to get the employee subgroup from the table
    select single ptext
        from t503t
        into itab_odoe-grade
        where persk eq pernr-persk
        AND SPRSL eq 'EN'.
    now in itab_odoe-grade the values comes is Workers (7) , Snr Mgt (M3)
    i want to show only the text in Brackets.

  • Need help writing host program using LabView.

    Need help writing host program using LabView.
    Hello,
    I'm designing a HID device, and I want to write a host program using National Instrument's LabView. NI doesn't have any software support for USB, so I'm trying to write a few C dll files and link them to Call Library Functions. NI has some documentation on how to do this, but it's not exactly easy reading.
    I've written a few C console programs (running Win 2K) using the PC host software example for a HID device from John Hyde's book "USB by design", and they run ok. From Hyde's example program, I've written a few functions that use a few API functions each. This makes the main program more streamlined. The functions are; GetHIDPath, OpenHID, GetHIDInfo, Writ
    eHID, ReadHIC, and CloseHID. As I mentioned, my main program runs well with these functions.
    My strategy is to make dll files from these functions and load them into LabView Call Library Functions. However, I'm having a number of subtle problems in trying to do this. The big problem I'm having now are build errors when I try to build to a dll.
    I'm writing this post for a few reasons. First, I'm wondering if there are any LabView programmers who have already written USB HID host programs, and if they could give me some advice. Or, I would be grateful if a LabView or Visual C programmer could help me work out the programming problems that I'm having with my current program. If I get this LabView program working I would be happy to share it. I'm also wondering if there might already be any USB IHD LabView that I could download.
    Any help would be appreciated.
    Regards, George
    George Dorian
    Sutter Instruments
    51 Digital DR.
    Novato, CA 94949
    USA
    [email protected]
    m
    (415) 883-0128
    FAX (415) 883-0572

    George may not answer you.  He hasn't been online here for almost eight years.
    Jim
    You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice

  • Need HELP regarding installinfg CR2008/Visual Advantage

    I need help regarding installing CR2008/Visual Advantage. I had the evaluation copy of cr2008. My compnay purchased the CR2008 Visual Advantage. Upon calling your customer service, I was told that I had to UN-install the CR2008 evaluation copy then install the CR2008. I did the unstall HOWEVER, when I try to install the CR2008 that we purchased, i get the following error..HR
    HR -2147024770-"c:\program files\business objects enterprise 12.0\win32_x86\REPORTCONVTOOL.DLL FAILED TO REGISTER"..
    I get more that just that one...I have received this before and based upon this formum, i have delted the regristry in the following using regedit.exe
    HKEY_LOCAL_MACHINE\SOFTWARE\BUSINESS OBJECT ;
    HKEY_CURRENT_USER\SOFTWARE\BUSINESS OBJECTS..
    Afeter i deleted the keys, I re-boot my pc and try to install the coftware again...BUT I GET THE SAME ERRORS...I have tryied this several times....what am i missing/not doing correctly

    Hi Shamish
    Actually you were on the right track, i think you just have to increase PSAPTEMP a bit and you will be fine. 358 MB seems just too small, i suggest you increase it to at least 2GB.
    1. what will be the difference in use of PSAPUNDO and PSAPTEMP while copy is running. ( i.e. what will be entered in PSAPUNDO and what will be filled in PSAPTEMP.)
    PSAPTEMP: is needed for large sort operations, as mentioned when you have a select with an ORDER BY clause, or if you do join two tables. During the client copy some sorting might be needed for special tables (cluster tables) where data is stored sorted.
    PSAPUNDO: undo space is only needed for DML (data manipulation), if data is changed undo is generated. This obviously is heavily the case during a client copy.
    2. the target client already has a copy taken 1 month before. so I think while importing it first delete existing data and then copies the new one.
    So If I first delete the target client and then take import on it; will it have advantage in regards of getiing UNDO or TEMP segments getting filled ?
    Deleting the client first might help for the undo problem, but you already solved that. I cannot imagine, it will help for the PSAPTEMP issue. As i said i would just increase PSAPTEMP and restart the copy.
    One more add: if you are doing the client copy with parallel processes, this will influence your requirements on temp and undo space, because of the concurrently running processes.
    Best regards
    Michael

  • Need Help Regarding Enabling The Matrix

    Hi All,
    We have got one user form and we have got one choose from list and one matrix, on click of choose from list the value will be displayed in the text box and at the same time matrix should get enabled. But it;s not happening in our case. The value is coming in the text box through choose from list but matrix is not getting enabled. We are able to change the back ground color of the matrix, make first column invisible and all but not able to enable the matrix. We need help regarding this one.
    Regards,
    Jayanth

    Hey first bind the columns of matrix to any user datasource
    and then you can enter any thing into your matrix 
    following code may help
    suppose you have one column
    oForm = SBO_Application.Forms.Item("URFRM")
    oUserDataSource = oForm.DataSources.UserDataSources.Add("URDSName",
    SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 20)
    oMatrix=oForm.Item("URMATRX")
    oMatrix = oItem.Specific
    oColumns = oMatrix.Columns
    oColumn = oColumns.Item("URCOLName")
    oColumn.DataBind.SetBound(True, "", "URDSName")
    oMatrix.Addrow()
    hope this will help
    additionally you can look at this sample
    .....SAP\SAP Business One SDK\Samples\COM UI\VB.NET\06.MatrixAndDataSources

  • Need Help Regarding JAVA BEAN

    Is any one tell me that JAVA BEAN only used in WEB or also you in Desktop applications???? and aslo tell how i implement Java class and use JAVA BEAN. I need help regarding above matter
    thanks in advance
    Rehan MIrza

    Here is a good link that indicate that JavaBean is not only for applets
    http://java.sun.com/docs/books/tutorial/javabeans/whatis/beanDefinition.html
    quote:
    The JavaBeans API makes it possible to write component software in the Java programming language. Components are self-contained, reusable software units that can be visually composed into composite components, applets, applications, and servlets using visual application builder tools. JavaBean components are known as Beans.
    Francois

  • I need help regarding setting my mail accounts on macbook pro

    I need help regarding resetting my mail accounts on macbook pro

    What kind of accounts do you need to reset? IMAP or POP accounts using one of the many web-based messaging systems? An Exchange server account? Were they working and now just not working any longer?
    You're going to have to be a little more specific in what you need...
    Clinton

  • I need help regarding installation of Netweaver 2004s

    Hi,
    I need help regarding installation of Netweaver. When ever i am running setup.exe, i am getting a page asking for local host and port number as 21212. When I enter my local host name and the port number as 21200 i am getting the error message given below and the installation stops. I am not able to proceed further. can any one help me what i need to do here. I created MS lookupadapter and entered my static ip address in 'host' file after 127.0.0.1 localhost and i disabled port number 3201 in system file. I verified system variables also. Everything is fine. I dont have firewall or antivirus installed in my system. Is there any thing else i need to do. please help me. Thanks in advance.
    " SAPinst is getting started.
    Please be patient ...
    starting gui server process:
      sapinstport: 21200
      guiport    : 21212
      guistart   : true
      command    : "C:\j2sdk1.4.2_09/bin\javaw.exe" -cp "C:/DOCUME1/ADMINI1/LOCALS1/Temp/sapinst_exe.6496.1162659801\jar\instgui.jar;C:/DOCUME1/ADMINI1/LOCALS1/Temp/sapinst_exe.6496.1162659801\jar\inqmyxml.jar" -Xmx256M -Dsun.java2d.noddraw=true SDTServer config=jar:sdtserver.xml guiport=21212 sapinsthost=localhost sapinstport=21200 guistart=true
    load resource pool G:\SAP\Softwares\IDES mySAP2005\51031898\IM_WINDOWS_I386\resourcepool.xml
    guiengine: no GUI connected; waiting for a connection on host (local hostname) , port 21200 to continue with the installation
    guiengine: login in process...............................
    guiengine: login timeout; the client was unable to establish a valid connection
    Exit status of child: 1"
    Regards,
    Farooq Shaik.

    Hi
    Run the sapinst.exe with the port 21212.This port 21212 is the default port used during the installation of netweaver.

  • Need help regarding image scanning from scanner and resizing it...

    Hi,
    I need help regarding scanning of image directly from scanner. Here is the scenario when the person clicks scan button on the webpage should scan the image and resize it and store it in some temp location. Is there any way i can do this. Any Help regarding this would be great!!!
    Thanks,
    Avinash.
    Edited by: Kalakonda on Jul 24, 2009 8:08 AM

    Kalakonda wrote:
    I need help regarding scanning of image directly from scanner. Here is the scenario when the person clicks scan button on the webpage should scan the image and resize it and store it in some temp location. Is there any way i can do this. Any Help regarding this would be great!!!So what you are doing is you have a Scanner (hardware: like an HP flatbed scanner) attached to a server that you want to use as a scanning station? Is this the senario that you are talking about?

Maybe you are looking for

  • How can i print the the entire help manual?

    Yes. I know how to view the help guide/manual online. Just want to know if I can print the entire guide out at once instead of wasting an entire day pointing, clicking, and printing each topic/subject individually. Thank you, Cal Thompson

  • Error in Simple Search

    i have created simple page with simple emp search. i have created query region(construction mode is autocustomizationcriteria, for that i have created query components(simplesearchpanel and simplesearchmapping) and i am searching based on empno. when

  • Touch cant connect to internet, but connects to router setup

    Hi, I have the 16gb ipod touch and my router is a belkin wireless g, i have a laptop and psp setup with the router and they work fine, i have mac filtering off and no wep or wpa thing on. I connect my touch to the wireless network on DHCP and dhcp is

  • Sync of user data with Active Directory

    I would like to connect the Active Directory with our SAP 4.6C system. Goal is to synchronize the user data (address, company, department,...) of AD with SAP user data, so we would only have to maintain this kind of data in the AD. Can anyone give me

  • Network timouts

    I have a location that randomly drops network packets.. Our Network crew says there is nothing wrong, but when running a continuous ping you can see it randomly drops a packet.. OBIEE 11.1.1.6.2 BP1 does not like this.. when on the BI web page, some