Using today() in member mdx
Hello,
i'm using Essbase 11.1.2.
MY question ist:
I want to create a member in my time dimension (ASO cube), which dynamically changes his member value by using a mdx formula.
For example a member "yesterday" which uses the mdx formula "StrToMbr(Substring(FormatDate(DateRoll(Today(), DP_DAY, -1), "mm-dd-yy"), 1, 5)))".
Other cases were something like "last month", "current year", "last year".
Principally this works. But there are two problems:
1) If i want to aggregate members using sum() the report is really slow. For example something like Sum([01-01-2012]:today()) is much slower than Sum([01-01-2012]:[03-20-2012])
2) If i use [timedimension].CurrentMember essbase is not able to dissolve a member which uses today() in his formula.
Any ideas??
Regards,
Stefan
Hi. There is no other column called "Today". I created the "My Today" solution simply because the directions within the view indicate that I should use [Today]. I am not including the "=" sign. I am simply trying to filter my view where a specific
date is equal to [Today]. The error message I get says something to the effect of the format of [Today] is not compatible with the filter. Is it possible that [Today] includes both date and time? My field is set up to display date only.
Similar Messages
-
Script Logic: Using a property in MDX *REC statement (BPC NW)
Hi,
Is it possible to use a Property in an MDX statement without using *LOOKUP() function? I have script successfully working but it takes 15 minutes to execute and would like to speed it up.
I understand that [DIMENSION].[MEMBER].Property is not valid syntax, and do not believe NW has any other functions to resolve the issue, except *LOOKUP which takes a long time.
Specific Example is below:
I have a piece of script that successfully splits JV Expense by customers. A Profit Share planning driver determines the percentage that each customer is entitled to. Typically this will be 100%, but could be 50% between two customers.
The PROFIT SHARE planning drivers records, and PARTNER_INCOME transactional records are below:
ACCOUNT
ENTITY
PARTNER
SIGNED DATA
PROFIT_SHARE
UK_001
PARTNER_A
0.5
PROFIT_SHARE
UK_001
PARTNER_B
0.5
PROFIT_SHARE
UK_002_PLANNING_DRIVERS
PARTNER_B
1.00
PARTNER_INCOME
UK_001
NO_PARTNER
$5,000
PARTNER_INCOME
UK_002
NO_PARTNER
$5,000
UK_001 has two partners that are each entitled to 50% of the $5,000 NET PROFIT.
For UK_002, one one single Partner is entitled to 100% of the $5,000 NET PROFIT.
Using script logic, you can scope the Profit Share account (PROFIT_SHARE) - , and use a *REC statement to multiply this by the driver. It would look like:
*XDIM_MEMBERSET ACCOUNT = PROFIT_SHARE
*WHEN ACCOUNT
IS *
*REC (EXPRESSION = %VALUE% * ([ACCOUNT].[PROFIT_SHARE],[PARTNER].[NO_PARTNER]), ACCOUNT = PARTNER_PROFIT_SHARE)
*ENDWHEN
This wouldn't be a problem if the Planning Driver is always stored on the same Entity that the Income is stored on, but for UK_002, the planning driver is stored on another Entity - which is stored in a the PLAN_DRIVER_REF property of the entity. It should use UK_002_PLAN_DRIVERS
ID (Entity)
PLAN_DRIVER_REF
UK_001
UK_002
UK_002_PLAN_DRIVERS
UK_002_PLANNING_DRIVERS
In this scenario, we need to switch out the Entity used in the MDX, however I do not believe you can use a property in MDX - can anyone confirm?
I have currently implemented the *LOOKUP functionality to loop through, changing each *LOOKUP partner for each loop.
Lookup:
*LOOKUP PLANNING_JV_US
*FOR %LOOP_ASLS% = %ASL_LOOKUP_LOOP_VARIABLE%
*DIM LOOK_%LOOP_PARTNERS%:ACCOUNT = "PROFIT_SHARE"
*DIM LOOK_%LOOP_PARTNERS%:PARTNER= %LOOP_PARTNERS%
*NEXT
*DIM ENTITY = ENTITY.PLAN_DRIVER_REF // Use PLAN_DRIVER_REF Property of Entity
*ENDLOOKUP
Scope and *REC:
*XDIM_MEMBERSET ACCOUNT = PROFIT_SHARE
*WHEN ACCOUNT
IS *
*FOR %LOOP_PARTNERS% = %PARTNER_LOOKUP_LOOP_VARIABLE% // 1000 Partners
*REC(EXPRESSION = %VALUE% * LOOKUP(LOOK_%LOOP_PARTNERS%), PARTNER= %LOOP_PARTNERS%, ACCOUNT = TCOJVSHAR_CALC, AUDIT_ID = PP_EXPENSE_BY_PARTNER)
*NEXT
*ENDWHEN
The problem with the above, is that because the Lookup is being generated for every single Partner, there are significant numbers of loops.
Does anyone know of another way this can be implemented in Script Logic? Otherwise we'll need to explore BAdI route.
Thanks,
NickHi Nick,
Use property in LOOKUP - will dramatically speed up the calculation without FOR/NEXT.
Vadim -
In mdx how to get max date for all employees is it posible shall we use group by in mdx
in mdx how to get max date for all employees is it posible shall we use group by in mdx
example
empno ename date
1 hari 12-01-1982
1 hari 13-06-2000
by using above data i want to get max dataHi Hari3109,
According to your description, you want to get the max date for the employees, right?
In your scenario, do you want to get the max date for all the employees or for each employee? In MDX, we have the Max function to achieve your requirement. You can refer to Naveen's link or the link below to see the details.
http://www.sqldbpros.com/2013/08/get-the-max-date-from-a-cube-using-mdx/
If this is not what you want, please provide us more information about the structure of you cube, so that we can make further analysis.
Regards,
Charlie Liao
TechNet Community Support -
Using [TODAY] in filtered views
The instructions under the filter section in Edit View clearly states; "Show all of the items in this view, or display a subset of the items by using filters. To filter on a column based on the current date or the current user of the site, type
[Today] or [Me] as the column value...". However when I use [Today] as my filter value, I received the following error message: "Filter Value is not a supported date format" My date fields are all set up
as date only, and I am assuming that [Today] also is set up as date only. Did something change in SharePoint 2010 that won't accept [today] as a filter value?Hi. There is no other column called "Today". I created the "My Today" solution simply because the directions within the view indicate that I should use [Today]. I am not including the "=" sign. I am simply trying to filter my view where a specific
date is equal to [Today]. The error message I get says something to the effect of the format of [Today] is not compatible with the filter. Is it possible that [Today] includes both date and time? My field is set up to display date only. -
Invoice date always use todays date
Hello!
Is there a user exit we can use to always set invoice date = today? In VF01 or VF04 is it also possible to set system to always use todays date?
RegardsHi,
This Data Requirement routine works fine with order to billing also. Check in VTFA for the relevant item category which Data VBRK/VBRP routine is assigned. If you have assigned any customer developed routine other than the standard one, try to incorporate the validation of Billing Date = System Date as like Standard Routine 11 = Billing = Today's Date. This is the simplest way we had achieved for order related billing.
Hope this helps.
Thanks
Krishna. -
Error in Calculated Column (using Today) in DataSheet View
I have a calculated column which display's the value based on the difference between today and requested date field.
=Today-[Requested Date]
This is working fine in SharePoint Standard View. But the same is not working with the datasheet view . The calculated column is showing as below
=#NAME?-[Requested Date].
Due to this i am not able to save the data. Can anyone please let me know how to solve this ?Hi,
First I have used today() function to calculate difference between 2 days except working days. The list is not automatically updating. If we change the Start_Date, then it calculates and gives the value. Can you suggrest me why this happens?
You have metioned in your post that there is some tricks in using today() function. I have created seperate Today_Date column in my list. And Used the same column name in finding difference between 2 days. Here also the same problem exists.
The formula I used is, =IF(AND((WEEKDAY([Today Date],2))<(WEEKDAY([Release Date],2)),((WEEKDAY([Release Date],2))-(WEEKDAY([Today Date],2)))>1),(((DATEDIF([Release Date],[Today Date],"D")+1))-(FLOOR((DATEDIF([Release Date],[Today
Date],"D")+1)/7,1)*2)-2),(((DATEDIF([Release Date],[Today Date],"D")+1))-(FLOOR((DATEDIF([Release Date],[Today Date],"D")+1)/7,1)*2)))
please suggest me how to get Difference between 2 date values get automatically updated everytime, when i open the list.
Abi Nachammai -
Is Oracle Secure Backup tool popularly used today?
Is Oracle Secure Backup tool popularly used today?
Which tap management tool is the most popularly used third-party software with Oracle database?We use ARCServe for tape backups. Seems to function fine.
-
Using LinRegPoint & LinRegSlope in MDX @ Essbase
Hi,
Does anyone know if I used LinRegPoint and LinRegSlope in a single MDX in Essbase.
Is the actual regression calculation done twice? or only once?
Thanks.
Kelvin
MDX functions: http://demoserver.entsoftsol.com/bisuite/dmcompanion/Help/MdxHelp.htmI had already explored the Time Series algorithm and the predictions are not what i wanted as i do not have the month and day sepecifications. The only measure i have is a year and a total for that year. And i have 5 years of historical data.
I was an easy solution. In excel we predict using Linear Expression and that is not something which is straight drag and drop in the OLAP World !! The dataset that i was using with the logic of "scenario" etc was incorrect. Cleanup the fact table (measures)
and make it appear like this:-
The factsummary table looks like below:-
DateKey FiscalYear total
20100101 2010 19000
20110101 2011 19700
20120101 2012 19800
20130101 2013 19666
20140101 2014 19444
Write an MDX Expression as below and thats about it !!
WITH
MEMBER Measures.[Total Sales Forecast] AS
LinRegPoint(
Rank( [Date].[Calendar].CurrentMember, [Date].[Calendar].CurrentMember.LEVEL.MEMBERS),
Descendants( [Date].[Calendar].[Calendar Year], [Date].[Calendar].CurrentMember.LEVEL),
[Measures].[Total],
Rank( [Date].[Calendar].CurrentMember, [Date].[Calendar].CurrentMember.LEVEL.MEMBERS))
,FORMAT_STRING="#,0"
SELECT
DESCENDANTS( [Date].[Calendar].[Calendar Year], [Date].[Calendar].[Year]) ON COLUMNS,
{ [Measures].[Total], Measures.[Total Sales Forecast]} ON ROWS
FROM [Adventure Works]
SQLSolutions360 -
Contact I did not add using a family member's pict...
There is a contact on my account useing a family members picture that has been hacked from another family member's account. I did not add this contact and my family member has deleted their account. Why? and what should I do
This post was transferred from its previous location to create its own new topic here; its subject and/or title has been edited to differentiate the post from other inquiries and to reflect the post's content.Thank you for your inquiry and the suggestions from our valued community members. Adding to what was stated, anyone who upgrades to the iPhone would need to activate it via iTunes. The upgrading line's voice mail box will be deleted and then needs to set up a new voice mail box. The saving of the information of the voice mail prior to upgrading to the iPhone is suggested unless it is not needed. When doing an upgrade on a line, it will have the new 2 year agreement regardless of giving it away.
The one who wants the iPhone on their line will repeat the process with activating it via iTunes with their voice mail box being deleted and re set up just like the first line that upgraded performed. However, once the voice mail box process has been completed on both lines, one after the other during the activation process it does not need to be done again on either line. As far as the warranty, when giving selling your phone to another, the warranty is voided and is not able to be transferred. -
Using "today" when making an iCal appointment in Day view gets it wrong.
When I view iCal in Day view and click on the '+' to make a new appointment, it doesn't get "today" correct. For example, assume it's November 16 and I'm viewing November 20 in Day view. If I click the '+' and then type "Run at 12:30 today" and appointment is recorded at 12:30 on November 20th, not today. However, if I'm using the Week view and type the same thing, it goes on November 16. If I type "Run at 12:30 tomorrow", the appointment is made for November 17th. Seems that iCal interprets "today" differently depending upon what view is selected. However, "tomorrow", "day after tomorrow", and "yesterday" are all relative to the current day, regardless of the view.
if (imageView1.hidden = YES) {
should be
if (imageView1.hidden == YES) { -
heey i bought an iphone 3gs about 2-3 months ago (used) was in mint condition well taken care of not even a scratch as soon as i got home i tried syncing it to my computer but didnt work it didnt even sync or notice my iphone software .. so i went to my friends and synced it there it has been working for music but videos wont work? but i didnt care and then the pop up that says update so we would click it wait and it wouldnt work ever since ive had it so i left it like that so i went to my friend today i blanked it off the phone itself and then tried to get the newest update cuz i wasnt able to before so i did and now im locked out and it says sim failure invalid sim i can even get into it PLEASE HELP and cant get a new sim at the moment or take it into the apple store because i live about an hour and a half away from the city and rarley go to it please help me !!!!!!!!!!!!!!
When I use find file http://www.macupdate.com/app/mac/30073/find-file (which does tend to find files that "Finder" can't), it's not coming up with any other itunes library files that have been modified in the past week, which I know it would have been - unfortunately, I don't have a very recent backup of the hard drive. It would be a few months old so it wouldn't have the complete library on it....any ideas? I'm wondering if restarting the computer might help but have been afraid to do so in case it would make it harder to recover anything...I was looking at this thread https://discussions.apple.com/thread/4211589?start=0&tstart=0 in the hopes that it might have a helpful suggestion but it's definitely a different scenario.
-
How can I use today's date as default value in query string filter web part in SharePoint
I have a query string filter on my web part page. I am trying to figure out how I can set it's default value to Today? I can't find anything online...
Hi,
Per my understanding, you might want to set a default value to the Query String Filter Web Part.
It would not be able to set default value to the Query String Filter Web Part with the OOTB features available.
By default, with a Query String Filter Web Part in the current page, we can filter other web part in the same page by adding parameters and values in the address bar
of browser.
If setting the “Query String Parameter Name” of a Query String Filter Web Part as “t”, then we can filter the corresponding connected web part by inputting such an
URL into the address bar:
http://sharepoint/SitePages/Page1.aspx?t=value1
Suppose you want to filter the list view with a value dynamically when user opens this page, as a workaround, we can generate an URL with the parameters needed when
page loaded, then redirect user to this URL afterwards. This can be achieved using JavaScript.
About how to redirect user to other page with an URL:
http://www.tizag.com/javascriptT/javascriptredirect.php
How to get today’s date using JavaScript:
http://www.w3schools.com/js/js_dates.asp
Best regards
Patrick Liang
TechNet Community Support -
Not using LC - Consoscope Member. OLAP Error
Hi experts,
First of all, I have deleted LC member in Consoscope dimensions, and also Script Logic (Instead of LC I use EUR). After processing Conso Application I get this error:
- CubeProcess : Errors in the OLAP storage engine: The attribute key cannot be found: Table: dbo_tblFactConsolidation, Column: CONSOSCOPE, Value: LC.
Errors in the OLAP storage engine: The process operation ended because the number of errors encountered during processing reached the defined limit of allowable errors for the operation.
Errors in the OLAP storage engine: An error occurred while processing the 'Consolidation' partition of the 'Consolidation' measure group for the 'Consolidation' cube from the [AppSet] database.
Errors in the OLAP storage engine: The process operation ended because the number of errors encountered during processing reached the defined limit of allowable errors for the operation.
Internal error: The operation terminated unsuccessfully.
Server: The operation has been cancelled.
How could i solve this?
RegardsHi,
This error is coming because of invalid records in your Consolidation. The reason behind it is the LC member has been deleted from Consoscope dimension. However, records with LC are still present in the fact table. And these records are no longer valid. To check this use the following SQL query in your database.
select * from tblfactConsolidation where Consoscope not in (select id from mbrConsoscope where calc = 'N')
This will give you the list of all the invalid records present in the fact table.
You can delete these statements by
delete from tblfactConsolidation where Consoscope not in (select id from mbrConsoscope where calc = 'N')
After this, try processing your application. It will work fine.
This will help. -
I have the following data in my cube
Prod ID Account ID Measure
1 10 20
2 10 20
2 20 10
Now I want an mdx query which would show an aggregation against the Account ID 10 as 20 only and not 40 as the Account ID is the same which means the desired output has to be something like
Account ID Measure
10 20
20 10
Note that Prod ID and Account ID are from different Dimensions.
Please let me know how do I do this in MDX. Any help is greatly appreciated!!Hi N
Another option is to use the Generate function and just take the last Prod Id for each Account. Your MDX will look something like
select non empty
{[Measures].[MyMeasure]
} on 0,
non empty
generate([Account ID].[Account ID].[Account ID].members
,tail(nonempty([Prod ID].Prod ID].Prod ID]*[Account ID].[Account ID].currentmember,[Measures].[MyMeasure]),1))
on 1
from MyCube
Richard -
Using todays date as default for this function in the package
Dear all;
please find attached the following sample data and syntax
create table tbl_one
id varchar2(200),
place varchar2(300),
create_date date
insert into tbl_one
(id, place, create_date)
values
('D', 'MN', to_date('3/3/2011', 'MM/DD/YYYY'));
insert into tbl_one
(id, place, create_date)
values
('X', 'DC', to_date('3/4/2011', 'MM/DD/YYYY'));
insert into tbl_one
(id, place, create_date)
values
('A', 'NY', to_date('3/31/2011', 'MM/DD/YYYY'));package from PL/SQL developer
body ----------
create or replace package P_test is
-- Public type declarations
type cur is ref cursor;
function test_fn
from_period in varchar2,
to_period in varchar2
) return cur;
end P_test;
spec ----------------------
create or replace package body P_test is
function test_fn
from_period in varchar2,
to_period in varchar2
) return cur as
my_cur cur;
Begin
open my_cur for
select p.id,
p.place
from tbl_one p
where trunc(p.create_date) >= to_date(from_period, 'MM-DD-YYYY')
and trunc(p.create_date) <= to_date(to_period, 'MM-DD-YYYY');
return my_cur;
end test_fn;
end P_test;now I was just wondering how do I get the to_period to have a default value of todays dateuser13328581 wrote:
I tried that already but it doesnt work unfortunately it shows no display...the only other way i can think of is use several if statement to check and then do a select into....however i just feel there is a better way to do it.
Edited by: user13328581 on Mar 31, 2011 1:09 PMDefine it doesn't work.
SQL> CREATE PROCEDURE dt_test (p_start_dt IN VARCHAR2,
2 p_end_dt IN VARCHAR2 DEFAULT TO_CHAR(sysdate, 'MM-DD-YYYY')) AS
3 BEGIN
4 DBMS_OUTPUT.Put_Line ('Start is: '||p_start_dt);
5 DBMS_OUTPUT.Put_Line ('End is: '||p_end_dt);
6 END;
7 /
Procedure created.
SQL> exec dt_test('01-01-2011', '02-28-2011');
Start is: 01-01-2011
End is: 02-28-2011
PL/SQL procedure successfully completed.
SQL> exec dt_test('01-01-2011');
Start is: 01-01-2011
End is: 03-31-2011Or are you always passing two parameters with the end date possibly null like this:
SQL> exec dt_test('01-01-2011', null);
Start is: 01-01-2011
End is:
PL/SQL procedure successfully completed.If that is you case then you can do something like:
SQL> CREATE OR REPLACE PROCEDURE dt_test (p_start_dt IN VARCHAR2,
2 p_end_dt IN VARCHAR2) AS
3 BEGIN
4 DBMS_OUTPUT.Put_Line ('Start is: '||p_start_dt);
5 DBMS_OUTPUT.Put_Line ('End is: '||COALESCE(p_end_dt, sysdate));
6 END;
7 /
Procedure created.
SQL> exec dt_test('01-01-2011', null)
Start is: 01-01-2011
End is: 31-MAR-2011
PL/SQL procedure successfully completed.So your predicate would become more like:
trunc(p.create_date) <= COALESCE(to_date(to_period, 'MM-DD-YYYY'), TRUNC(sysdate);John
Maybe you are looking for
-
A quick and easy way to add genre to songs in a playlist
I have a 160mb classic ipod and I want to shuffle only a portion of my total library tracks. I am thinking the best way to do this is to use the Smart Playlist function and shuffle by genre. But if I do that I want to change the genre label or add on
-
Error message: Table could not be found when opening reports with InfoView or CMC
Post Author: Giovanni CA Forum: Authentication Hi All, I have Crystal Reports Server XI R2 installed on a server and the database folder (foxpro) is located on a different server. Crystal is connected to the database using an ODBC connection (UNC pat
-
in Gmail we have two mailboxes mine and my wife's. When I send from my mailbox and when i indicate my mailbox in the 'from' box, it always picks up and sends my wife's email address. Help
-
Getting an error "invalid Number" while populating Xref database
Hi all, My target table(XREF_DATA) has the following parameters and its respective datatypes:- XREF_TABLE_NAME XREF_COLUMN_NAME ROW_NUMBER VALUE IS_DELETED LAST_MODIFIED LAST_ACCESSED All are of varchar2 But when i am executing the interface and obse
-
No Internet connection during a few minutes any time I start up my iMac
When I start my iMac up (ethernet connection), I have to wait about 3 or 4 minutes to be able to use a navigator, as there is no internet connection. I get messages like Time out or DNS failed etc... then after this time the Interne works. I have no