MDX calculation based on date logic for the Jan 1 of current year through the 15th of the previous month

Hello, 
We need some help with an SSAS MDX query based on date logic. One of the problems is that I don't have access to the Cube but have been given a query example with the logic needed for the calculation. Here's the scenario; 
The ETL process will run on the first Tuesday after the 15<sup>th</sup> of a given month. The Analysis Cube data queried should include the current year up to the end of the previous month. For example, on May 19<sup>th</sup>
(the first Tuesday on or after the 15th) the query should include data from January 1<sup>st</sup> through April 30<sup>th</sup>.
The 15<sup>th</sup> of the month is not part of the query, it is a factor in when the query is run. The query will always be in terms of complete months.
SELECT
                NON EMPTY { [Measures].[Revenue Amount],
                [Measures].[Utilization],
                [Measures].[AVG Revenue Rate],
                [Measures].[Actual Hours] }
ON
                COLUMNS,
                NON EMPTY { ([dimConsultant].[User Id TT].[User Id TT].ALLMEMBERS * [dimConsultant].[Full Name].[Full Name].ALLMEMBERS * [dimConsultant].[Employee
Type].[Employee Type].ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION,
                MEMBER_UNIQUE_NAME
ON
                ROWS
FROM
                ( SELECT
( { [dimDate].[Week Date].[1/4/2015], [dimDate].[Week Date].[1/11/2015], [dimDate].[Week Date].[1/18/2015], [dimDate].[Week Date].[1/25/2015], [dimDate].[Week Date].[2/1/2015] } )
                ON
                                COLUMNS
                FROM
                                ( SELECT
( { [dimIsBillable].[Is Billable].&[True] } )
                                ON
COLUMNS
                                FROM
[SSASRBA]
WHERE
                ( [dimIsBillable].[Is Billable].&[True], [dimDate].[Week Date].CurrentMember ) CELL PROPERTIES VALUE,
                BACK_COLOR,
                FORE_COLOR,
                FORMATTED_VALUE,
                FORMAT_STRING,
                FONT_NAME,
                FONT_SIZE,
                FONT_FLAGS

Hi Hans,
Thank you for your question.  
I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated.  
Thank you for your understanding and support. 
Regards,
Simon Hou
TechNet Community Support

Similar Messages

  • Calculation based on date key figures in BEx

    Hi Friends,
    Hi Friends,
    I need to creat report for sales order data, which involved the calculation based on dates.
    In my cune iam having the data at the granual level with the dates as key figures. the calculation that i need to do is VTW = Actual PGI date - Customer want date.
    1) whn i run the report at the granual level my VTW is working correctly. No issues.
    2) when i run the report at higher levels the date fields are updated with X, as the system is unable to aggrigate the dates. The dates are at the material level in  a sales order. I need to show the VTW at the sales order level (each one of the two dates are same for all the materials). So, when i run the report with out mataril at the sales order level...i wanto sea the bothe date fields in a single line and also the VTW calculated as the different between throse two dates.
    3) Once we get the VTW correctly at the sales orde level. if i drill down the report for material, i want to sea both the dates in every record againest the matarial, but the VTW only aginest the first record...that is againest the sales order. I dont waht the VTW value repeated/duplicated for all the records againest the sales order,as VTW makes sence only at the Sales Order level.
    Please suggest me hwo i can achive the resulsts by meeting both Point 2 and 3.
    Thanks for ur help...in advance.
    Thanks,
    Renu

    Hi..
    I have the data from the extractore and in the cube as below.
    SALES ORDER    ITEM                MATERIAL            DATE1                         DATE2
    101                        Item1               Mat1              01/01/2010                15/01/2010
    101                        Item2               Mat2              01/01/2010                15/01/2010
    101                       Item3                Mat3             01/01/2010                15/01/2010
    I need the reports as below...
    Report1:
    SALES ORDER        DATE1                         DATE2                  VTW (DATE2 - DATE1)
    101                        01/01/2010                15/01/2010                14
    currently iam getting this Report1 output as below...
    SALES ORDER        DATE1                         DATE2                  VTW (DATE2 - DATE1)
    101                             X                                   X                           42
    Report2: Out put required as below
    SALES ORDER     ITEM                MATERIAL            DATE1                         DATE2      VTW (DATE2 - DATE1)
    101                        Item1               Mat1              01/01/2010                15/01/2010              14
    101                        Item2               Mat2              01/01/2010                15/01/2010
    101                   I     tem3                Mat3             01/01/2010                15/01/2010
    currently iam getting this Report2 output as below...
    SALES ORDER     ITEM                MATERIAL            DATE1                         DATE2      VTW (DATE2 - DATE1)
    101                        Item1               Mat1              01/01/2010                15/01/2010              14
    101                        Item2               Mat2              01/01/2010                15/01/2010               14
    101                   I     tem3                Mat3             01/01/2010                15/01/2010               14
    As VTW is need to be measued at the sales order level and we always have the DATE1 & DATE2 as same for all the itesm, it should be shon as only 14 in the first record. It mean once iget the required output from Report one in a single line with VTW as 14, it should not repeat with every line , when i dril down the report for Items or materials.
    Even if i can generate oly report2 as required in a single sheet ...that will be enough.
    Plas kindly provide some solution as how we can achieve this,
    Thanks,
    Renu

  • How do you set up a default Date To based on Date From for report parameter

    I'm working on a report. I have been asked to set up a default Date To based on Date From for the report parameters. I mean when running a report, if an end user selects a value for parameter Date From, system will automatically populate the Date To parameter based on the Date From + 6 days.
    I guess there's gotta be something to do with Value Set. Do any of you guys know how to go about this?
    Any suggestion is greatly appreciated.
    Dennis

    You should be able to retrieve the value of other valueset using :$FLEX$.<valuesetname> I'm not sure about the exact syntax, it's been a while since i worked with applications.

  • How system will automatically populate clearing date field for invoices paid similar to when payments are made to the vendors

    Hi SAP Gurus,
    Could you help me on this, How system will automatically populate clearing date field for invoices paid similar to when payments are made to the vendors.
    Regards
    Mohan

    Hi Ramakrishnappa,
    If you clear the invoice against payment, then the invoice clearing date would be payment document posting date.
    Regards,
    Mukthar

  • I'm using a 16GB iPhone 4s, with the latest version of iOS 8.1.1. Whenever I go to the "Cellular" settings on the main settings page and turn OFF cellular data usage for native apps like mail, app store, contacts, photos etc , the moment I back out a

    I'm using a 16GB iPhone 4S, with the latest version of iOS 8.1.1. Whenever I go to the "Cellular" settings on the main settings page and turn OFF cellular data usage for native apps like mail, app store, contacts, photos etc , the moment I back out and come back in, all the native apps I turned cellular off for are back on again. Kindly help me

    Exact same question as ankit1986, specifically with the photos while on cellular-only, and as simple as it sounds, I tried the hard reboot Ingo2711 suggested.  Still experiencing the same error with the native apps reverting to on.  It's killing our shared data-plan (2GB).

  • HT1725 When I download a song from iTunes into my library, it often says it has downloaded, charges me for it, and on the song in my library shows the full playing time. However, when I play the song, at around halfway through it skips to the next song?

    When I download a song from iTunes into my library, it often says it has downloaded, charges me for it, and on the song in my library shows the full playing time. However, when I play the song, at around halfway through it skips to the next song?
    i'm just wondering:
    a) why it does this
    and b) how to stop it doing this, because it still charges me for the song :/

    If your country's iTunes Store allows you to redownload purchased tracks, I'd delete your current copies of the dodgy tracks and try redownloading fresh copies. For instructions, see the following document:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    Otherwise, I'd report the problem to the iTunes Store.
    Log in to the Store. Click on "Account" in your Quick Links. When you're in your Account information screen, go down to Purchase History and click "See all".
    Find the items that are not playing properly. If you can't see "Report a Problem" next to the items, click the "Report a problem" button. Now click the "Report a Problem" links next to the items.

  • We recived  ipads today in school to use as a tool and they said if i sync it to my itunes my itunes will be erased and all the ipad stuff currently on there would be erased the second i connect to the school i was wondering if this was possible?

    we recived  ipads today in school to use as a tool and they said if i sync it to my itunes my itunes will be erased and all the ipad stuff currently on there would be erased the second i connect to the school i was wondering if this was possible? i already pointed a couple things that they said was true but were false like useing that find my ipad thing were it just zooms in on your location they also said it would beep and they can track it anywhere witout a 3g network which we use the wi fi. teachers can connect to itunes i belive becasue they don't have the same rescrtictions as use students but early in the year they said one teacher tried and failed with the results that said would happen to  use. besides ristrictions like loseing the app store and not being aloud to open any app wemb adresses we are to add  music via the itunes that i already on the ipad. i was just wondering if there full of it right now because i think they are.

    If I were a teacher setting up iPads to be used at school/work, I wouldn't link it to my personal iTunes, rather I'd create/use a different one. If for no other reason than to keep the kidlets and your fellow teachers from possibly accessing your account.

  • Well, I bought some gems in Clash of Clans in app purchase function. The money has been deducted from my credit card but the gems didn't come through. What's the problem?

    Well, I bought some gems in Clash of Clans in app purchase function. The money has been deducted from my credit card but the gems didn't come through. What's the problem? Please help

    If the purchase went through successfully and it's not just a temporary store holding charge on your card, then try the 'report a problem' page to contact iTunes Support : http://reportaproblem.apple.com
    Or you can try contacting iTunes Support via this page : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • How to create a 0FISCPER variable for [last period of current year]

    Hello,
    Can anybody tell me how to create a (exit) variable for the last period of the current year, based on 0FISCPER ?
    Based on a single value, user entry variable based on 0FISCPER.
    I did not find any standard (business content) variables for this.
    Can anybody tell me whether the following alternative works:
    variable 0P_BA102 (last period pervious year) with offset of +12 
    Kind regards.

    Hi,
    It should work.
    You can refer to the following link:
    http://help.sap.com/saphelp_sm32/helpdata/en/3f/89533e5ff4d064e10000000a114084/content.htm
    Regards,
    Amit

  • How do I stop the Yosemite desktop image showing through unoccupied space on the Illustrator CS6 screen?

    Loading Ai - the toolbars display around the Yosemite desktop image? A new page will open but the Yosemite image appears in unoccupied spaces on the screen If I click on these areas, the toolbars disappear?? Help!

    that's normal behaviour on Mac OS. it used to be the way all software worked, but the application frame a la Windows is default in the other CC software for some reason. to use that way, go to Window > Application Frame.

  • The sound will only play through one side of the ear buds

    I have had my ipod classic 160GB for several years now. One day recently it just stopped emitting sound from one side of my ear buds. I tried different ear buds with no results. If I leave the ear bud jack plugged in half way in then it works, but I do not want to keep it unsecured like that. I do not still have my warranty on the ipod otherwise I would have contacted Apple directly.  

    You can obtain a replacement headphone jack/hold switch assembly from eBay or other online store. Opening the iPod isn't the easiest thing but it can be done with the accompanying tools, and a bit of patience and effort. Once the back is off the actual replacement of the components is quite easy though the screws are tiny. I've done half a dozen of these and/or battery swap outs.
    tt2

  • I have a 5 year old Dell PC and purchased the Airport Express last year.  After one of the iphone 4s updates I lost the contact and cannot reestablish.  I have even tried to hard wire from my router to the airport express and I cannot connect.

    I have a 5 year old Dell PC and purchased Airport Express last year.  I used my iphone 4s to connect and it has been working until recently I lost connection after one of the iphone updates.  I cannot make contact with the unit.  I have even used an ethernet cable that I hooked to my router and still won't work.  I cantinually get this message from Airport Utility.  An error has occurred and I can not do anything else.

    If you have the AirPort Express setup in Bridge Mode, try changing the Connection Sharing setting to "Share a public IP address"
    AirPort Utility - Manual Setup
    Click the Internet icon
    Connection Sharing = Share a public IP address
    Update
    You will probably get a message about a Double NAT error. Click to "ignore"
    This setting might allow mutliple devices to connect and may not. It's worth a try...I have about a 60-70% success rate at hotels with this setting.
    Unfortunately, as you note....hotels have become a lot smarter about connections to their network. At some point, they probably will not even allow another router to connect at all.

  • Retirement Date Calculation based on Date Of Birth

    Hi All,
    We have 11.1.2.2 PSPB Application where we have requirement to calculate "Retirement date" (in the format dd/mm/yyyy) based on employee's "Date Of Birth", for which i tried with @DateRoll function, but no luck. For time being we tried "Retirement Year" which was successful.
    "Retirement Year"=@INT ("Date Of Birth"/10000)+60;
    For Example: If Employee's Date of Birth is 7/11/1946 thru above script i got 2006 as his "Retirement Year", now i need "Retirement Date" as 6/11/2006 which im not getting. I tried in all ways like:
    1) "Retirement Date"=@DateRoll ("Date Of Birth",DP_YEAR,1); got output as 31/03/5127 for "Date Of Birth" 01/01/1975
    2)"Retirement Date"= @FORMATDATE ("yyyyddmm",@DateRoll ("Date Of Birth",DP_YEAR,1)); no luck.
    3)"Retirement Date"=@DATEDIFF (@Today(),"Date Of Birth",DP_YEAR)); no luck.
    Also all the Date functions like @DateRoll,@FromatDate,@DateDiff etc returns number representing the date between January 1, 1970 and Dec 31, 2037, is that true? If yes, what functions needs to be used for  "Date of Birth" above the range.
    Please suggest ASAP.
    Thanks in advance.
    Regards,
    Sahi

    If anyone's interested, I found a solution
    if (DropDownGuarantee.rawValue eq "1" and DteStart.rawValue ne null) then
    Num2Date(Date2Num(DteStart.formattedValue, "M/D/YYYY") + 30, "M/D/YYYY")else
    if (DropDownGuarantee.rawValue eq "2" and DteStart.rawValue ne null) then
    Num2Date(Date2Num(DteStart.formattedValue, "M/D/YYYY") + 30, "M/D/YYYY")else
    if (DropDownGuarantee.rawValue eq "3" and DteStart.rawValue ne null) then
    Num2Date(Date2Num(DteStart.formattedValue, "M/D/YYYY") + 60, "M/D/YYYY")else
    if (DropDownGuarantee.rawValue eq "4" and DteStart.rawValue ne null) then
    Num2Date(Date2Num(DteStart.formattedValue, "M/D/YYYY") + 60, "M/D/YYYY")else
    if (DropDownGuarantee.rawValue eq "5" and DteStart.rawValue ne null) then
    Num2Date(Date2Num(DteStart.formattedValue, "M/D/YYYY") + 60, "M/D/YYYY")else
    if (DropDownGuarantee.rawValue eq "6" and DteStart.rawValue ne null) then
    Num2Date(Date2Num(DteStart.formattedValue, "M/D/YYYY") + 90, "M/D/YYYY")else
    if (DropDownGuarantee.rawValue eq "7" and DteStart.rawValue ne null) then
    Num2Date(Date2Num(DteStart.formattedValue, "M/D/YYYY") + 90, "M/D/YYYY")else
    if (DropDownGuarantee.rawValue eq "8" and DteStart.rawValue ne null) then
    Num2Date(Date2Num(DteStart.formattedValue, "M/D/YYYY") + 90, "M/D/YYYY")else
    if (DropDownGuarantee.rawValue eq "0" and DteStart.rawValue ne null) then
    Num2Date(Date2Num(DteStart.formattedValue, "M/D/YYYY"), "M/D/YYYY")else
    if (DropDownGuarantee.rawValue eq "9" and DteStart.rawValue ne null) then
    "enter expiration date"
    Marlene

  • Calculation based on date but year&month on seperate fileds.

    Hello,
    Simple question:
    I have a table in 9i with the fields SOURCE, YEAR, MONTH
    Since I dont have a date field, how do I count e.g the records <07/2008 ?
    SAMPLE DATA:
    APPLES;2008;06
    APPLES;2008;07
    APPLES;2008;08
    Thank you in advance for your help.

    Without conversion to date:
    WITH sample_data AS (SELECT 'APPLES' Source, '2008' AS Year, '06' AS Month
                           FROM DUAL
                         UNION ALL
                         SELECT 'APPLES', '2008', '07'
                           FROM DUAL
                         UNION ALL
                         SELECT 'APPLES', '2008', '08'
                           FROM DUAL)
    SELECT *
      FROM sample_data
    WHERE YEAR < '2008' OR (YEAR = '2008' AND MONTH < '07');The "WITH sample_data AS (...)" block serves to mimic a sample table, so you can SELECT COUNT(*) FROM SOURCES
    WHERE YEAR < '2008' OR (YEAR = '2008' AND MONTH < '07');Urs
    Edited by: metzguar on 30.06.2011 13:15

  • Performing calculation on text data fields - for Master Data infoobjects

    Gurus,
    I've a MD InfoObject Z_Obj containing set of attributes -  Z_Attr1, Z_Attr2 and Z_Attr3 , the data for this fields contains text ( of single character)
    The requirement goes like this
    Attribute     Value   Value to be displyed in the Report
    Z_Attr1 -      Y                        A
    Z_Attr1 -      N                    <Blank>
    Z_Attr2 -      Y                         B
    Z_Attr3 -      N                     <Blank>
    Z_Attr4 -      Y                        C
    Z_Attr5 -      N                     <Blank>
    Without making use of any ABAP routine , What are the possible ways we can achieve this in Output.
    Remember I want the validation of the fields at report level not at the ODS/DSO/MD InfoObject level.
    Please do help me about the various possibilites.
    Thanks in advance <removed by moderator>
    Regards,
    Yaseen
    Edited by: Siegfried Szameitat on Nov 7, 2008 9:15 AM

    This can be done :
    Create 3 formula variables of type replacement path.
    While creating :
    In the general tab, choose reference characteristic as Z_Obj.
    In Replacement Path tab,
    Replace variable with : Infoobject
    Replace with            : Attribute value
    In below drop down choose your attribute appropriately.
    Now you can use this formula variables to create formula or CKF.
    Hope this helps.

Maybe you are looking for

  • ValueChangeListener in a Region

    Hi, I have added a valuechangelistener to a SelectOneChoice componenet in a region. At runtime, when i change the value in the lov, it doesnot call the method of valuechangelistener, where as if the add the same component with same valuechangelistner

  • Screen resolution Compaq 2405x under Windows XP

    I bought a Compaq 2405x monitor and installed the drivers from CD (my system is Windows XP), The preferred resolution is 1920x1200, but the result after installation gives only other values such as 1024x768 or 1600x1200. In ControlPanel, Properties o

  • App store got a updates for me, but its not my Apple ID

    I bought a second hand MacBook Pro from a colleague of mine at work, he erased all the things he wanted to save to himself and I deleted is user name and created my own user name and became the new Admin. ive updated to the new operating system "Yose

  • Why I cant authorize my Iphone to computer?

    Hi I wanted to sync some music from my computer to my Iphone 5s but it says that you have to authorize this computer first. so i clicked on authorize this computer but it said ' including this one,you have authorized one computer out of your availabl

  • How to transfer outlook cantact to iphone 4s

    how to transfer outlook cantact to iphone 4s