Current Month - Last 12 Months in OLAP Universe
I need to create a conditional objects at OLAP Universe and use it in WEBI report to run for last 12 months from Current Month.
We have exit variable for CM (Current Month). Can any one advise how to create the conditional object at Universe level to restrict always 12 months worth of data. I need to schedule the report and when ever it runs, it shouls pull only last 12months.
Can I implement like [0CALMONTH].CurrentMember - 12 , I need to get last 12 months. I need to do this only with Time dimension, I dont want to have any measure assosiated with just like in regular RDBMS definitions in Universe.
Thanks
Pat
Edited by: patnaik24 on Apr 12, 2010 10:50 PM
Hi
I would recommend to modify the existing customer exit variable so that it will restrict the data for the last 12 months. You can then create a prompt in your web intelligence report that limits additionally the data to the current month when necessary.
Regards,
Stratos
Similar Messages
-
Expression - First date and last date of current month, current year
Hi
I need to have 2 ssrs expression as I can use as default parameters in my report where I can - out from my Time dimension, get the
first date of the current, current year - and one where I get last date, current month, current year.
My data source is a SSAS cube and my timedimension is structured like this:
[Time].[Days].&[2009-01-16T00:00:00]
Any suggestions how to solve this ?Hi ,
You can use below in Default Values in ssrs ;
for first Day of current month and year
="[Time].[Days].&[" +Format(dateadd("m",0,dateserial(year(Today),month(Today),1)), "yyyy-MM-dd")+"T00:00:00]"
output will be ;
[Time].[Days].&[2014-09-01T00:00:00]
For last day of current month and year
="[Time].[Days].&[" +Format(DateSerial(Year(Now()), Month(Now()), "1").AddMonths(1).AddDays(-1), "yyyy-MM-dd")+"T00:00:00]"
output will be ;
[Time].[Days].&[2014-09-30T00:00:00]
Please correct me if I misunderstood your requirement.
Thanks
Please Mark This As Answer or vote for Helpful Post if this helps you to solve your question/problem. -
XL Reporter Report for comparison of last month and current month sales
Hi,
Our management requires an MIS report for comparison of sales in revenue and in terms of units for the last and the current month todate.
Is there a way to view this data for both the months together, without any user input?
Best Regards
JyotiJyoti,
I'll try and explain the XLR Report you'd need for this. This is isn't the best way to explain something like this, but I'll give it a shot.
- Put an expansion on Row 8 and choose all Items (*), click Apply
- In A8, put ItemCode
- In B8, put Item Name
- In C8, put Sales - A/R Row Total
- In D8,put Sales - A/R Row Total again
- Setup a Parameter
- Call it Period
- Dimension
- Financial Period
- In Column D, put a column Summary and click into Financial Period
- click the button to open the selection window
- click to the parameter tab
- select your parameter and click OK and click Apply
- In Column C, put a column Summary and click into Financial Period
- click the button to open the selection window
- click to the parameter tab
- in the bottom right corner, add a "-1" it should look like this @Period-1
- click OK and click Apply
- In C7 and D7 - choose Financial Period Code from formula builder
(so you can see the period code at the column header)
This will show sales by item in the current Period (column D) and previous Period (column C)
Hope that helps and at least gets you going. I can't guarantee those are perfect instructions from memory.
Brad Windecker
[Omega Business Solutions|http://www.omegagroup.com] -
Hi Experts,
I need to create a report which includes records of current month and last 7 days of previous month.
I will get records of current month by this formula :- month({PROBSUMMARYM1.OPEN_TIME})=month(currentdate)
Please tell me how to add the records of last 7 days of previous Month for the same report.
Thanks in Advance.Hi Ajay,
If you have more than a year data in your database then your formula will return wrong results. ie. If your data consist of 2012,2013,2014 data then below formula will return all 8th month data irrespective of year. So, you need to check year also here
month({PROBSUMMARYM1.OPEN_TIME})=month(currentdate) and
Year({PROBSUMMARYM1.OPEN_TIME})=Year(currentdate)
Now add Abhilash second statement in OR so, your formula should look like :
(month({PROBSUMMARYM1.OPEN_TIME})=month(currentdate) and
Year({PROBSUMMARYM1.OPEN_TIME})=Year(currentdate))
OR
Date({PROBSUMMARYM1.OPEN_TIME}) IN [DateAdd('d',-7,Maximum(LastFullMonth)), Maximum(LastFullMonth)
-Sastry -
If Current Month then use last day, else use month
My cube is setup where the current month is at a daily level and the previous months just contain the last day of data.
I would like to for the last month to only return the last day and return the month level for all previous months. The reason being is our third party software gives us the capability of doing a drillthrough, but when doing it for the latest month, it is
returning every day in that month.
Here is my attempt, but it is only returning the last month, not the rest of the months.
select [Measures].[Current Balance]
on 0, non empty
[Date].[Month].children
on 1
from [MyCube]
where
IIF([Date].[Month].CurrentMember = ClosingPeriod([Date].[Month].[Month]),
TAIL (NonEmpty([Date].[Date].members,[Measures].[Count Of Accounts]),1),
[Date].[Month].CurrentMember)Hi Dodge,
I’m writing to follow up with you on this post. Was the problem resolved by the above query?
If the issue was solved, I’d like to mark this issue as "Answered". Please also feel free to unmark the issue, with any new findings or concerns you may have.
Thanks,
Charlie Liao
TechNet Community Support -
Variable last date of previous month/last date of current month
Hello Experts,
I am facing an issue while designing a query.
Requirement is like this.
Report will be run on monthly basis.so on execution of report, it should prompt for month/year.
now on report there are two columns for which I have to get data on date basis(last date of previous month and Last date of current month).
Can anyone tell me is there any standard variable for this? what is it?
or how to achieve this?
Regards,
NiravHi,
See if this post in this forum can help you.
Re: Last date of a month
Regards
Shalabh Jain -
Last day of previous month, first day of current month
Hi,
Whats the best way to calculate the last date of the previous month, and the first day of the current month.
Thank you for your help.
Sumit.Here are FMs
SG_PS_GET_LAST_DAY_OF_MONTH FM calculating the last day of a month
FVOZ
RE_LAST_DAY_OF_MONTH
HRHCP00_TIME_HANDLING
HR_HCP_GET_LAST_DAY_OF_MONTH
HRVE_REPORTING
HRVE_LAST_DAY_OF_MONTH
RPDD HR-D: Payroll Germany
RP_LAST_DAY_OF_MONTHS HR-D: Determine last day of month
SLS0 PAW - Miscelaneous (MISC)
SLS_MISC_GET_LAST_DAY_OF_MONTH FM calculating the last day of a month
VVSRCH
LAST_DAY_OF_MONTHS
BWSO_DATE_GET_FIRST_WEEKDAY
CKSO
CK_F_GET_FIRST_DAY_OF_DATE
HRBEN00SPENDA
HR_BEN_SPENDA_FIRST_LAST_DAY
HRPB
HRPP_CCODE_GET_FIRSTDAY_PERIOD
HRVE_PAYROLL
HRVE_GET_FIRST_LAST_MONDAY
JBT6
ISB_GET_FIRST_DAY
KED2
RKE_GET_FIRST_DAY_IN_PERIOD
MCP2
MC_PERIOTAB_BT_FIRST_LASTDAY
MC_PERIO_GET_FIRST_AND_LASTDAY
Thanks
SK -
Show data of last day of previous month against any day of current month
Hi,
I have fact table which contains data at date level (we have data for oct-2009 to april-2010). Our requirement is to show data of last day of previous month against any day of current month in obiee 11g. I am facing problem in Feb 2010 its picking data of 28-Jan-2010 instead of 31-jan-2010 and for April its picking data of 30-mar-2010 instead of 31-mar -2010.
Any suggestion ???You're asking to filter your data set to only include rows between:
1) last day of the previous month
2) any day of the current month
This can be achieved with prompting in OBIEE Answers.
last day of previous month = TIMESTAMPADD( SQL_TSI_DAY , -(1), TIMESTAMPADD( SQL_TSI_DAY , DAYOFMONTH( CURRENT_DATE) * -(1) + 1, CURRENT_DATE)) . The problem is you need to make query work within Oracle's Answer syntax.
In the prompt, select the operator type for your date dimension as 'between' and default to 'SQL Results'.
For the 'last day of previous month' , use the query:
SELECT
case when 1=0 then Time."Fiscal Date" else TIMESTAMPADD( SQL_TSI_DAY , -(1), TIMESTAMPADD( SQL_TSI_DAY , DAYOFMONTH( CURRENT_DATE) * -(1) + 1, CURRENT_DATE))
end
FROM ENTER_YOUR_PRESENTATION_FACT_FOLDER_HERE
For the current date, use the query:
SELECT
case when 1=0 then Time."Fiscal Date" else CURRENT_DATE
end
FROM ENTER_YOUR_PRESENTATION_FACT_FOLDER_HERE
Another option is to create a last_date_pervious_month variable in the RPD and have that as the default value in your prompt. -
Creation of a Query to show the values for the current month and the last 12 months data.
Dear All,
Good day!
I have to create a Query with the below requirement.
I have to create a Query to show the values for the current month and the last 12 months data.
Can you please guide me how to achieve this ??
thank you,
Regards,
HemaHema
explain the exact problem..? as you mentioned you want to create query to show values for current month and last 12 months.. so I think you want to show values for 12 months from current data.. you can achive this by multiple way..
you can have selection screen and field with date .. and restrict based on system current date and 12 months before or you can handle this at your target.. .. I mean there are multiple ways to restrict data by date range..
for some more hints..
http://www.forumtopics.com/busobj/viewtopic.php?t=34393&sid=7fba465d0463bf7ff5ec46c128754ed6
http://businessintelligence.ittoolbox.com/groups/technical-functional/cognos8-l/how-to-display-last-12-months-in-report-based-on-todays-date-3231850
http://scn.sap.com/thread/3217381
search on SDN you will get many other ways..
Thanks,
Bhupesh -
OLAP Universes - Based on BEx Query - Month and Previous Month Functions
Hi,
I created a Universe based on SAP BEx queries and I like to create a filter so that I use in Web Intelligence report to run for "Previous Month" data always. There are "Date" filelds in BEx Query(No Month info only date data). I have no knowledge of SAP BEx Queries and new to OLAP universes. Could you help.
How to create filter that show Previous Month.
Nanda Kishore
Edited by: Nanda Kishore B on Dec 26, 2010 6:15 AMThe easiest way (but NOT the most efficient one) is to create a local variable (Dimension) in your report with the following code:
=if (Month(CurrentDate())=1 AND Month([[MyDate]])=12 AND Year([[MyDate]])=(Year(CurrentDate())-1)) OR (Month(CurrentDate())>1 AND Month([[MyDate]])=(Month(CurrentDate())-1)) then 1 else 0
where MyDate is the field from your query containing the data information
Activate the report filter area in your report design panel by pressing the Report filter icon and drag and drop your variable there and apply it to the entire report. Filter value 1 and you will get the data for the previous month.
Keep in mind that this approach is not optimal especially if you do have many rows of data delivered to your WebI report because filtering takes place only AFTER the data is retrieved. The Best practice here is to work with BEx variables.
How many rows of data does your WebI report normally fetches?
Regards,
Stratos -
SQL query to get last 6 months records neglect the current month
Hi All;
I need help with
sql query to get last 6 months records neglect the current month
Any help much appreciated
Thanks
Pradnya07SELECT <> FROM tbl WHERE dt >=dateadd(month,-6,GETDATE())
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
i have a scenario where i need the data of last date of every month and if the month is current month need current date data...
is it possible using MDX...Hi Shashi,
According to your description, you want to return the last day for each month except current month, right?
In MDX, we can use ClosingPeriod function to return the member that is the last sibling among the descendants of a specified member at a specified level, here is a sample query for you reference.
with member [measures].[a]
as
ClosingPeriod ([Date].[Calendar].[Date],[Date].[Calendar].currentmember).name
select {[measures].[a]} on 0,
[Date].[Calendar].[Month].members on 1
from
[Adventure Works]
And then use the IIF function to evaluate if the month is current month. Please refer to the links below.
http://msdn.microsoft.com/en-us/library/ms145584.aspxhttp://msdn.microsoft.com/en-IN/library/ms145994.aspx
Regards,
Charlie Liao
TechNet Community Support -
How to display records based on current month and last month???
i have a query that want to display the data for current month and last month. when i try to view the reports, all the data/key figures is return all in 0.00.
i modify the variables for this current month and last month but still the results is the same. i could not see the data. any advise on how to modify the variables for this current month and last month? i am thinking my variables is wrong.
for the current month variable:
the type of variable is characteristic value, processing by customer exit, reference characteristic is calendar year/month.
thanks for all who are kind to help me here....Hi,
If you install the variables from BC correctly and they are in active state, you can use them directly use them. check for this month the total values at info cube is ZERO or some value. as you told you are getting ZEROS for your input.and check the data at cube level based on your query design, apply all restrictions, fileters and see do you get any data at cube level and compare with report. -
How to get current month and last month dynamically??
how to get current month and last month dynamically
like
month = getCurrentMonth();
lastmonth = getcurrentMonth() -1;
please help
thankshi :-)
/* depracated but can be still useful */
java.util.Date dtCurrent = new java.util.Date();
int month = dtCurrent.getMonth();
int lastmonth = dtCurrent.getMonth() - 1;
System.out.println("* " + month);
System.out.println("* " + lastmonth);
/* better to use this one */
Calendar cal = new GregorianCalendar();
int imonth = cal.get(Calendar.MONTH);
int ilastmonth = cal.get(Calendar.MONTH) - 1;
System.out.println("*** " + imonth);
System.out.println("*** " + ilastmonth);
regards, -
Last/latest 10 months data ( including current month)
Hi,
I need to find the last/latest 10 months data ( including current month)
Year
1/1/2014
1/2/2014
1/3/2014
1/4/2014
1/5/2014
1/6/2014
1/7/2014
1/8/2014
1/9/2014
1/10/2014
1/11/2014
1/12/2014
1/1/2013
1/2/2013
1/3/2012
1/4/2012Hi,
this is my data
Year column with Nvarchar datatype.
Year
1/1/2014
1/2/2014
1/3/2014
1/4/2014
1/5/2014
1/6/2014
1/7/2014
1/8/2014
1/9/2014
1/10/2014
1/11/2014
1/12/2014
1/1/2013
1/2/2013
1/3/2012
1/4/2012
now form this yea) column i need to fetch the latest/last 10 months data only .
OutpUt for the Query to be:
Year
1/3/2014
1/4/2014
1/5/2014
1/6/2014
1/7/2014
1/8/2014
1/9/2014
1/10/2014
1/11/2014
1/12/2014
Hope this will give you clear picture
Maybe you are looking for
-
Purchase Order created with status "Held"
Hi Experts, I need your help. When SC with free text item is approved the purchase order is created in status "Held". It were previosuly created with state "Ordered" . How I can solve this it? Many Thanks. Regards, David
-
Concatenating context value and non-context value
Hi, I have a context binding to one of the input field(lets say field-X) and also I have another dropdown list UI element(lets say field-Y) which is not bound to any context. When a user enters values in field-X and selects a item from field-Y hits
-
I've repeatedly defined a bevavior to two link colors together (a gradient colorize from one group links to the gradient colorize of another group.) I'll set it, it works just fine. When I close the project and open it up again, the "Apply To" is alw
-
OSX 10.8.2 Kernal Panics daily, at idle, any time, all the time
Any Ideas on what might be causing these repeated kernal panics would be greatly appreciated. here is the most recent log I found when i got home from work today. Interval Since Last Panic Report: 109332 sec Panics Since Last Report: 9 Anon
-
Inventory not seen in the console?
Hello, Watching the InventoryAgent.log file on the client I have: Collection: Namespace = \\.\root\cimv2; Query = SELECT __CLASS, __PATH, __RELPATH, BuildNumber, Description, Manufacturer, Name, ReleaseDate, SerialNumber, SMBIOSBIOSVersion, SoftwareE