Current position:  Home > Default > Last date of the selected quarter

Last date of the selected quarter

Time:November 30
Advertisement
hi all - I have been struggling to figure out how to get the last date of selected quarter. for example, if the user has selected 2014 Q1 from the date hierarchy, I want to show 2014-03-31.
any idea how to accomplish this? thanks in advance
Advertisement
Hi Sam,
There are several ways to do this in MDX.  
One way is to use LastChild a few times.  For example, if your hierarchy had Period, Week, and Day below Quarter, and you were sure the user had selected a Quarter (the MDX could check) try this assuming your date hierarchy is calle [Date].[Fiscal
Calendar].    [Date].[Fiscal Calendar].lastchild.lastchild.lastchild
  The first lastchild will get the last Period in the Quarter, the second lastchild the last week in that Period and the third lastchild will get the last day of that week.
Another way, which will work for any level they selected would be something like; assuming the Day level is called [TheDate].   Tail(Descendants([Date].[Fiscal Calendar],[Date].[Fiscal Calendar].[TheDate]),1).item(0)  The descendants
gets all the days in the selected period, the tail gets a set including just the last day, and Item(0) gets that particular day.
Of course, the MDX snippets above could be used in larger MDX expressions.
Hope that helps.  It really is worthwhile to learn a little MDX.  Remember, anything is possible in MDX if the cube has the data.
Richard

Next quarter to the selected quarter

-0001-11-30

Hi Experts, Our requirement is to show the data in the report for the next rolling up quarters to the selected quarter in the prompt. Ex. If user has selected 2010-Q2 then report should show the data for 2010-Q3, 2010-Q4,2011-Q1 and 2011-Q2. Please s

Last date of the previous quarter

-0001-11-30

Hi, How can i find the last date of the previous quarter, based on todays date (the fiscal year starting from 1st April) the quarters are 1st april to 30th June, 1st July to 30th sept, 1st Oct to 31st Dec and 1st Jan to 31st March872435 wrote: Hi, Ho

Oracle 10g - Date format in SELECT query for CFOUTPUT

2015-10-11

Hello, everyone. The project that I am working on in the dev environment is connected to an Oracle 11g database, but the production side is Oracle 10g. I have a page that is erroring in production (but not development) when it gets to a date that it

I am attempting to have cells use data from a selective month from the year before so that I can show actual from the prio. years each month.

2015-10-11

I am attempting to have cells use data from a selective month from the year before so that I can show actual from the prio. year each month. I need to create a spreedsheet using the the Acutlas from the year-to-date and from last year-to-date, but ne

New tab in XD01 only when company code data button is selected

2015-10-11

Hello all, I added a new tab in XD01 with the help of BADIs CUSTOMER_ADD_DATA and CUSTOMER_ADD_DATA_CS. But the new tab is appearing at all levels i.e general as well as company code level. But my client needs the new tab to be displayed only when th

How to compare dates in a select query in open sql

2015-10-11

Hi                    How can I retrieve data pertaining to a specified date using a select query. I have inserted date using the following code: String dateString = "2009-03-11"; java.sql.Date date = java.sql.Date.valueOf(dateString); PreparedS

FISCAL year from Date  in the Selection Screen.

2015-10-11

Hi Folks, Is there any function module which returns the Fiscal year if we provide the date in ranges. I mean, I have a select option for date in the selection screen.So,if a user enters the date say 01042007 01042007 it should return the correspondi

Setting default date range in selection screen when executing as batch job.

2015-10-11

Hi Guys, I have one report to be scheduled as weekly batch job and one of the selection screen field is date range. If i set this report to run today then the date range will be from one week back date(Lower value) to today date(Higher value). When i

Date Processing for Select-Option

-0001-11-30

Dear forumers, I have a select-option element that takes in a range of PO Date. The SELECT statement is as follows:- select ebeln        bedat        ekorg        ekgrp        bukrs from ekko into corresponding fields of table gt_ekko where bedat in

Date equality in select statement

-0001-11-30

Date equality in select statement giving 0 result even table contains record matching to it.please suggest what wrong in this query 1- select *from  EOE_POC.PRODUCT_TEST_REPORT where CREATE_DATE = '03-SEP-13' 2 - select *from  EOE_POC.PRODUCT_TEST_RE

Data transfer of Selected sets (QS51) using Function modules

-0001-11-30

Hi All, I am doing data migration of Selected sets (TCODE QS51) using function module. I have tried using BDC recording but it is not working in background.In foreground it is giving information error on second screen as field  RQSKT-AUSWAHLMGE is no

Data without the select keyword

-0001-11-30

Can we get the table data wihtout using SELECT keyword in query? Just a out of the box question, asked in interview.Mangal9i wrote: Can we get the table data wihtout using SELECT keyword in query? Just a out of the box question, asked in interview.Wi

Entry Date in Dynamic selection of FBL3N

-0001-11-30

HI Experts, I need Entry date in dyanamic selection of report FBL3N. Can anyone please help me out with this? Thanks, NitishHi Nitish, This can be done in the IMG path: Financial Accounting (New) >General Ledger Accounting (New)>Master Data>G/L A

How to change date format in select-option (mm.yyyy).

-0001-11-30

Hi,    Plz, How to change date format in select-option (mm.yyyy).   in my selection screen date type selection-option is there ,when i am enter date   it's  taken  dd.mm.yyyy format,but i want mm.yyyy format. how to set that . Regards, Kk.sorry param

Can i print date/time on selected photos in IPhoto? (version 9.5.1)

-0001-11-30

Can I print date/time on selected photos in IPhoto?Yes, with the iBorderFx plugin, which is free. http://www.iborderfx.com/iborderfx/Read other 2 answers

How describe model data and  get select in DB throw topLink.

-0001-11-30

Hello, I have table from code create table t_tree id int primary key, parent_id int, value varchar2(255) Alter table t_tree add constraint constr_id_parent foreign key (parent_id) references t_tree (id) I must get query select level as lv,lpad('[email protected]',

Date as a select option in sales order report.....

-0001-11-30

hello guys i want to add sales doc date from as a lower field and date to as a higher field on a selection screen.....so please help me out......i also want to add error message for it.....Simply add the date field as select-options error msg on choo

Dynamic date in the selection according to fiscal year variant

-0001-11-30

Hi Is it possible to set dynamic date input parameter from the fiscal year variant sap table (OB29 transaction). For example when I run valuation (F.05) I want the value date input field to be the last day of the previous period. Thanks OferHi, The d

How do you delete records from table with data in a select option

-0001-11-30

how do you delete records from table with relevant to data in a select option..how to write codingHi, Try if not s_select_option [ ] is initial. delete * from table where field in s_select_option. endif. commit work. Be careful though. If select opti