Dynamic count of the metrices for last 3 quarters + current quater.

Hi ,
In one of our report we want to calculate the count of a metric for last 3 quarters + current quater. But the problem here is that we want to generate the dynamic count.
for eg:
report now should show total count for quarter 10Q4,11Q1,11Q2,11Q3. when the 11Q4 come then the count sholud be from 11Q1 to 11Q4 and so on..
Please note that we have a server variable curr_qtr for caculating current quarter.
Appreciate your help.
Thanks

Thanks,
the issue has been resolved by making a repository variable for last year quarter and then taking both current quater and last year quater varibale in the report filter.

Similar Messages

  • How to Identify incoming and outgoing IDOC in the system for last one year.

    Dear All,
    How to Identify incoming and outgoing IDOC in the system for last one year.
    Regards
    Ashok

    Dear Anindya,
    I used WE05 the result by giving direction outbound.Then on created field i put the value date.I m getting the output in the no of idoc number.
    This is only the way to identify?
    Thnx
    Ashok
    Edited by: ashok singh on Oct 22, 2009 8:40 AM

  • While opening pdf files the menu bar, navigation bar  cracks unobviously and also close and minimise buttons  goes hidden..Facing the problem for last one month. Please help.

    while opening pdf files the menu bar, navigation bar  cracks unobviously and also close and minimise buttons  goes hidden..Facing the problem for last one month. Please help.

    The latest Kaspersky software version is 15.0.1.415 or 15.0.1.415ab.

  • How to get the data for last 3rd business day and also include saturday and sunday if its a wednesday?

    Hi All,
    I have a simple query which is below:-
    Declare @reportdate date
    set @reportdate= (DATEADD(dd,-5,getdate()))
    select * from dbo.Table
    where date IN (@reportdate)
    I need this query to pull the data for the last 3rd business day .So lets say today is monday then i need the data for last week wednesday which is 3 business days back from monday, if today is a tuesday it would be for last thursday ( as 3 business days for
    tuesday would be thursday). But if today is wednesday then i need to be last 3rd business day which is last friday and i also need to get the data for saturday and sunday.
    Can someone please help me how cani change my filter to do this?
    Please let me know if i am still unclear.
    Thanks

    Hi SqlDev12,
    Based on my understanding on your requirement, you can reference the below sample.
    CREATE TABLE BusinessTable
    Bdate DATE,
    Wd VARCHAR(10)
    ;WITH Cte(DT,WD) AS
    SELECT CAST('20150401' AS DATE),DATENAME(WEEKDAY,CAST('20150401' AS DATE))
    UNION ALL
    SELECT DATEADD(DAY,1,DT),DATENAME(WEEKDAY,DATEADD(DAY,1,DT)) FROM Cte
    WHERE DT<GETDATE()
    INSERT INTO BusinessTable SELECT * FROM Cte
    SELECT * FROM BusinessTable
    SET DATEFIRST 7 -- Set Sunday as the first day of a week
    DECLARE @givenDay DATE ='20150415' --Wednesday
    SELECT * FROM BusinessTable
    WHERE Bdate BETWEEN
    --For Monday and Sunday, select last wednesday
    (CASE WHEN DATEPART(WEEKDAY,@givenDay) IN(1,2) THEN DATEADD(DAY,2,DATEADD(WEEK,DATEDIFF(WEEK,0,@givenDay)-1,0))
    --For Tuesday and Wednesday, last week's Thursday and Friday
    WHEN DATEPART(WEEKDAY,@givenDay) IN(3,4) THEN DATEADD(DAY,-5,@givenDay)
    --For Thursday and Friday, current week's Monday and Tuesday
    WHEN DATEPART(WEEKDAY,@givenDay) IN(5,6) THEN DATEADD(DAY,-3,@givenDay)
    --For Saturday, current week's Wednesday
    ELSE DATEADD(DAY,2,DATEADD(WEEK,DATEDIFF(WEEK,0,@givenDay),0)) END)
    AND
    (CASE WHEN DATEPART(WEEKDAY,@givenDay) IN(1,2) THEN DATEADD(DAY,2,DATEADD(WEEK,DATEDIFF(WEEK,0,@givenDay)-1,0))
    WHEN DATEPART(WEEKDAY,@givenDay) IN(3) THEN DATEADD(DAY,-5,@givenDay)
    WHEN DATEPART(WEEKDAY,@givenDay) IN(4) THEN DATEADD(DAY,-3,@givenDay)
    WHEN DATEPART(WEEKDAY,@givenDay) IN(5,6) THEN DATEADD(DAY,-3,@givenDay)
    ELSE DATEADD(DAY,2,DATEADD(WEEK,DATEDIFF(WEEK,0,@givenDay),0)) END)
    DROP TABLE BusinessTable
    If you have any feedback on our support, you can click
    here.
    Eric Zhang
    TechNet Community Support

  • OSX error message - the software for this printer is currently unavailable

    OSX error message when loading driver for photosmart 7520 - "the software for this printer is currently unavailable.  Please contact the printer's manufacturer for the latest software."  

    I searched the web for you and found this.
    http://h10025.www1.hp.com/ewfrf/wc/softwareCategory?os=219&lc=en&cc=us&dlc=en&sw_lang=&product=51994...
    Say thanks by clicking the Kudos Thumbs Up to the right in the post.
    If my post resolved your problem, please mark it as an Accepted Solution ...
    I worked for HP but now I'm retired!

  • Epson software install problem: The software for this printer is currently unavailable. Please contact the printer's manufacturer for the latest software." But i have downloaded from Epson and Apple!!!

    I am trying to install a printer Epson xp-605 but when i try to add it, Apple says it can't find the software. I have downloaded the software from Apple website and also from the Epson installation disc!  The message is: "The software for this printer is currently unavailable. Please contact the printer’s manufacturer for the latest software."

    Try a reset of the printing system. This often resolves the symptom you are experiencing.

  • Month doesn't appear in the axis for last 12 months

    Hi !
    I have created a graph which gives records for the last twelve months, my formula is:
    if {Commande.DATE} >= dateadd('m',-12,currentdate) and {Commande.DATE} <=currentdate then {Commande.DATE}
    At this point everything's fine ,
    I have to create another formula to have Month name
    from today which mean ,the order should be like this on my graph axis, 1st last month is febuary and last 12 months from today is March
    March - April - May - June - July - August - September - October - November -December - January Febuary
    here is that formula which I have called Month Sort order:
    If month({@last12months})=01then
    "Janv" else
    if month({@last12months})=02 then
    "Fév" else
    If month({@last12months})=03then
    "Mars" else
    if month({@last12months})=04 then
    "Avril" else
    If month({@last12months})=05then
    "Mai" else
    if month({@last12months})=06 then
    "Juin" else
    If month({@last12months})=07then
    "Juil" else
    if month({@last12months})=08 then
    "Août" else
    If month({@last12months})=09then
    "Sept" else
    if month({@last12months})=10 then
    "Oct" else
    If month({@last12months})=11then
    "Nov" else
    if month({@last12months})=12 then
    "Déc" else ""
    in the Graph/Chart expert ,in the resulting dialog box I have set  the following options:
    On Change of: i have set the formula Month Sort order which will bring me the  month name  and for the order I have set in the Original order .
    It works fine I retrieve records for last 12 months but on  my axis ,the name for
    the last 12 months doesn't appear  in this case ( March) it is blank ,I have the records for March but not the month name March in my axis  it show april  to febuary  but not March
    Thank you for helping me

    Thank you for your reply , but this doesn't solved my problem  ,
    I'm using a data from SQL2005 which is a stored procedure ,they have created a datefield named "DATE" and group the data the 1st of each month in this SQL stored procedure ,the only day for each month that I have in this data is the first of each month for each record found ,so I've changed the formula for this, to get records the 1st of each month for the last 12 months :
    the new Formula for is:
    if >= DateAdd("m",-12,CurrentDate) - day(CurrentDate)+1 and
    <=DateAdd("m",-1,CurrentDate) - day(CurrentDate)+1 then
    this condition formula bring me _Null datefield_ ,and this is why I see a null label axis at the bottom,do you have an idea how I can eliminate the null datefield , I need to have only the last 12 months data on this graph but I need all data for the past 3 years for 2 other grah on this same report
    Thank you very much ,

  • Does anyone know how to exclude footnotes from the word count in the Pages for iPad app?

    If I create a doc on pages for ipad, then view it on the iMac, the word count is lower.  I figured out that this is because Pages counts all the words in the footnotes.  Does anyone know how to make it exclude footnotes from the word count? 

    I see the exact same behavior on my IPAD(s) and IPHONE(s). This isn't the loss of titles already identified in other posts. Every movie that wasn't purchased from iTunes, meaning all my movies of my kids, shows it sync in iTunes, but doesn't show up anywhere on the devices.
    Help Apple! Please un-break the feature that was functional before.

  • Getting the data for last month of every year

    Hi,
           How to declare the date if we want to pull the data from the December of every year.
    For example if the query is run in march 2015 and they want the historical data it should pull only the data from dec 2014.
    In the same way if they ran the query in future jun 2016 and if they want to historical data it should pull only data from dec 2015.
    It should not coded manually. Please help me with date format that need to used.
    BALUSUSRIHARSHA

    Please follow basic Netiquette and post the DDL we need to answer this. Follow industry and ANSI/ISO standards in your data. You should follow ISO-11179 rules for naming data elements. You should follow ISO-8601 rules for displaying temporal data. We need
    to know the data types, keys and constraints on the table. Avoid dialect in favor of ANSI/ISO Standard SQL. And you need to read and download the PDF for: 
    https://www.simple-talk.com/books/sql-books/119-sql-code-smells/
    A table has to have a key to be table.  Here is my guess at a repair job: 
    CREATE TABLE Test_Data
    (pu_id INTEGER NOT NULL
      REFERENCES PU(pu_id),
     pu_date DATE DEFAULT CURRENT_TIMESTAMP NOT NULL,
     PRIMARY KEY (pu_id, pu_date),
     x_count INTEGER,
     y_count INTEGER);
    Identifiers are not numeric in a good schema. What math do you do with them? They are also the key in the table that models the entity they identify. Where is the PU table (and what is a PU anyway)? 
    INSERT INTO Test_Data
    VALUES
    (28, '2014-01-01', 10, 20), -- crap! No key in this mess!! 
    (28, '2015-01-01', 30, 20), -- 
    (28, '2014-12-12', 10, 20), 
    (28, '2015-02-02', 10, 20);
    A PIVOT is not a query and not even part of SQL. It is how Microsoft programmers who do not know RDBMS or have a report writer violate the tiered architecture of SQL. We also do not use XML mixed in SQL. It is a bitch to maintain, has poor performance and again
    violates the tiered architecture principle. 
    A query is not sorted because it is a table. A file in COBOL can be sorted and that seems to be what you really want to write. 
    Old COBOL love the Sybase CONVERT() string function to avoid SQL temporal data. 
    We never use SELECT * in production code; Google it. Not only are you generating code, you are generation bad code. 
    Since SQL is a database language, we prefer to do look ups and not calculations. They can be optimized while temporal math messes up optimization. A useful idiom is a report period calendar that everyone uses so there is no way to get disagreements in the DML.
    The report period table gives a name to a range of dates that is common to the entire enterprise. 
    CREATE TABLE Month_Periods
    (month_name CHAR(10) NOT NULL PRIMARY KEY
       CHECK (month_name LIKE <pattern>),
     month_start_date DATE NOT NULL,
     month_end_date DATE NOT NULL,
      CONSTRAINT date_ordering
        CHECK (month_start_date <= month_end_date),
    etc);
    These report periods can overlap or have gaps. I like the MySQL convention of using double zeroes for months and years, That is 'yyyy-mm-00' for a month within a year and 'yyyy-00-00' for the whole year. The advantages are that it will sort with the ISO-8601
    data format required by Standard SQL and it is language independent. The pattern for validation is '[12][0-9][0-9][0-9]-00-00' and '[12][0-9][0-9][0-9]-[01][0-9]-00'
    This will port and waste time calling string function row by row. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • How to change the settings for Last data update in BI

    Dear All,
    If you want to display that "Status of Data " field in the report... Then you need to set it at...
    Run the query -> from the BEx toolbar choose LAYOUT -> Display text elements -> General.
    If this is not set, then it will not show in report output.
    Status of data is the time on which the latest load occured to the cube. Lets say, you have built a report on a cube which is loaded on 01/10/2007. When you run the report, the status of data will show this date 01/10/2007 until you load the cube again. In this case, if you load on 01/20/2007, the status would now show up as 01/20/2007.
    If we want to display that field in the report...
    Run the query -> from the BEx toolbar choose LAYOUT -> Display text elements -> General.
    The above all is for BW 3.5
    but i want to know for BI 7 and EP
    Regards
    venu

    Hi,
    First thing here is, in SM58 u r finding the entries means those are related to TRFC LUW's. we shuld never stop this unless those are not useful.
    These TRFC's moves from the source system to different Target systems by their respective users.
    As u said that these Entries are occupying the system resources i.e in accordance to that we have to increase our dialog process in the system not to simply stop that TRFC entries.
    These trfc's move basing on the Dialog processes in the system i.e if the processes are free then these entries move freely from system to system.
    Automatically system generates these LUW's when ur scheduling a load from R/3 to BI system.
    This will not be generated to BI by a particular job in R/3.This depends on the volume of the data only.
    So pls have a talk with BASIS team regarding the resource availability and the movement of the LUW's/TRFC's into BI system.
    rgds,
    Edited by: Krishna Rao on Jun 25, 2009 1:38 PM

  • How do I create a dynamic table in the form for auto field detection?

    I am new to Acrobat. We need to create a form template that contains dynamic table control so that it can be populated using auto field detection.
    Our dynamic table contains reimbusement information, the rows vary from one claim to another.
    Please help. We are having Acrobat 9 Pro.
    Thanks
    Prasadh

    A lot is possible. There is a scripting language which should fill the gaps of missing features. There is data merge, there is XML, there is InCopy. Read everything about it and you will surely find what you need.

  • MDX to dynamically create period to date for each month of current year

    I need some help with MDX. I am not even sure if this is possible to do but here is what I need.  Any help is greatly appreciated.
    I have a Date dimension with a hierarchy defined as Year-Qtr-Month-Date
    I have a measure called Rentals
    Assume the current date is 10/24/2014.  I want to display by month for the year 2014, the sum of rentals equivalent to the current MTD.  So January would sum 1/1 thru 1/24.  February would sum 2/1 thru 2/24.  March would sum 3/1 thru
    3/24, etc.
    On the end of the current month, all months would display the sum of the whole month. I am not concerned if a month ends on the 30th or 31st.  The end is end.
    It needs to be dynamic enough so that if the current date is the 27th, each month would sum from the 1st to the 27th.

    Hi Rocko,
    According to your description, you want to compare the sum amount of rentals for each month, right?
    In MDX, we can use
    PARALLELPERIOD function returns a member from a prior period in the same relative position as a specified member. So you can use the query like
    with set Period as {[Arrival Date].[Date].[Month].&[2014]&[1]:[Arrival Date].[Date].[Month].&[2014]&[27]}
    member [Arrival Date].[Date].[0] as sum({Period})
    member [Total Amount N-1] as (PARALLELPERIOD([Arrival Date].[Date].[Month], 1, [Arrival Date].[Date].[Year].&[11]), [Measures].[Total Amount])
    Here is a sample query on AdventureWorks cube.
    SELECT ParallelPeriod ([Date].[Calendar].[Calendar Semester]
    , 3
    , [Date].[Calendar].[Month].[October 2003])
    ON 0
    FROM [Adventure Works]
    Regads,
    Charlie Liao
    TechNet Community Support

  • 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

  • Why there are some metric without "Last Upload" in "All Metric" page?

    I am developing a MYSQL Plugin. after I deployed it to agent, and add target to it. I found there is something strange for some metric collecting/uploading. And I test it on both OMS 10.2.0.4 and OMS 10.2.0.5, they have the same issue.
    In page “All Metric”, not all of metrics have a value under column “Last Upload”. And if I click the metrics without “Last Uploaded”, some of them actually have data collected/uploaded and display it in UI. Then I am very confused why those metric had no "Last Upload" in All Metric page? Does it mean those three metric only collected/uploaded once? Does it mean there are something wrong with my XML? or what?
    Here is the definition for one of metrics without “Last Upload”,
    ===========================================================
    <Metric NAME="ProcessList_Count" TYPE="TABLE" HELP="NO_HELP">
    <Display>
    <Label NLSID="mmd_ip">ProcessList_Count</Label>
    <Description NLSID="mmd_ip_desc">The ProcessList_Count</Description>
    </Display>
    <TableDescriptor>
    <ColumnDescriptor NAME="GroupBy" TYPE="STRING" IS_KEY="TRUE">
    <Display>
    <Label NLSID="mmd_ip_GroupBy">GroupBy</Label>
    <Description NLSID="mmd_GroupBy_desc"> The GroupBy. </Description>
    </Display>
    </ColumnDescriptor>
    <ColumnDescriptor NAME="Ip_User_Aggr_Count" TYPE="NUMBER" IS_KEY="FALSE">
    <Display>
    <Label NLSID="mmd_ip_Ip_User_Aggr_Count_Value">Ip_User_Aggr_Count</Label>
    <Description NLSID="mmd_ip_Ip_User_Aggr_Count_desc"> The Ip_User_Aggr_Count. </Description>
    </Display>
    </ColumnDescriptor>
    <ColumnDescriptor NAME="Command_Aggr_Count" TYPE="NUMBER" IS_KEY="FALSE">
    <Display>
    <Label NLSID="mmd_ip_Command_Aggr_Count_Value">Command_Aggr_Count</Label>
    <Description NLSID="mmd_ip_Command_Aggr_Count_desc"> The Command_Aggr_Count. </Description>
    </Display>
    </ColumnDescriptor>
    </TableDescriptor>
    <ExecutionDescriptor>
    <GetTable NAME="MysqlProcessAggregate" USE_CACHE="TRUE"/>
    <GroupBy NAME="IpUserAggrCount_I" FROM_TABLE="MysqlProcessAggregate">
    <By NAME="GroupBy" COLUMN_NAME="UserIp" />
    <AggregateColumn NAME="Ip_User_Aggr_Count" COLUMN_NAME="Id" OPERATOR="COUNT"/>
    </GroupBy>
    <GetView NAME="IpUserAggrCount_II" FROM_TABLE="IpUserAggrCount_I">
    <Column NAME="GroupBy" COLUMN_NAME="GroupBy" />
    <Column NAME="Ip_User_Aggr_Count" COLUMN_NAME="Ip_User_Aggr_Count" />
    <ComputeColumn NAME="Command_Aggr_Count" IS_VALUE="TRUE" EXPR=" " />
    </GetView>
    <GroupBy NAME="CommandAggrCount_I" FROM_TABLE="MysqlProcessAggregate">
    <By NAME="GroupBy" COLUMN_NAME="Command" />
    <AggregateColumn NAME="Command_Aggr_Count" COLUMN_NAME="Id" OPERATOR="COUNT"/>
    </GroupBy>
    <GetView NAME="CommandAggrCount_II" FROM_TABLE="CommandAggrCount_I">
    <Column NAME="GroupBy" COLUMN_NAME="GroupBy" />
    <ComputeColumn NAME="Ip_User_Aggr_Count" IS_VALUE="TRUE" EXPR=" " />
    <Column NAME="Command_Aggr_Count" COLUMN_NAME="Command_Aggr_Count" />
    </GetView>
    <Union NAME="Result">
    <Table NAME="IpUserAggrCount_II" />
    <Table NAME="CommandAggrCount_II" />
    </Union>
    </ExecutionDescriptor>
    </Metric>
    ===========================================================
    ===========================================================
    <CollectionItem NAME="MysqlProcessAggregate">
    <Schedule>
    <IntervalSchedule INTERVAL="10" TIME_UNIT="Min" />
    </Schedule>
    <MetricColl NAME="MysqlProcessAggregate" />
    <MetricColl NAME="ProcessList_Count" />
    </CollectionItem>
    ===========================================================
    Any help will be appreciated!!!
    Thanks,
    Satine

    Hello Satine,
    If the 'Last Upload' timestamp value shows "-", it means data for particular metric(s) never got uploaded from EM Agent. This can happen if:
    - Metric collection is disabled
    - Metric is defined as 'Real-Time metric'
    - Metric is defined for scheduled collection, however, due to some parsing error, EM Agent
    You mentioned -
    "...And if I click the metrics without “Last Uploaded”, some of them actually have data collected/uploaded and
    display it in UI. Then I am very confused why those metric had no "Last Upload" in All Metric page? Does it
    mean those three metric only collected/uploaded once? Does it mean there are something wrong with my
    XML? or what?..."
    By clicking on the metric link (on 'All Metrics' page), you are performing a real-time collection - i.e., Agent is informed to collect the data and provide it to the caller APIs so that the data can be displayed on UI. Such a data displayed is not from EM Repository. Hope this addresses your confusion with - "...why those metric had no "Last Upload" in All Metric page...". If you want to see the history data, you need to expand the particular metric and click on the sub-links (which are the non-kyy metric-columns that you would have defined in the target-type metadata xml file)
    Since you mentioned that when you are doing a real-time collection (by clicking on the metric link on 'All Metrics' page), you are retrieving data, I don't think there should be anything wrong in the metadata xml file. Yes, it can happen that EM Agent didn't find an entry in default-collection OR there was parsing issue for the entry in default-collection, which may cause the metric to be assumed as 'real-time' by EM Agent. However, looking at the example that you specified, don't think that should be the case.
    Can you check
    1. the 'Collection Schedule' and 'Upload Interval' mentioned for these metrics on 'All Metrics' page ? Is this
    same as what you specified in the default-collection xml file ?
    2. Are there any errors reported in emagent.trc / emagent.log for metric "ProcessList_Count" ?
    Regards,
    -Shant

  • Is there a way to dynamically figure out the FIRSTROW & LASTROW using Bulk Insert?

    I noticed most of my files follow a certain convention, so I can use Bulk Insert with this:
    FIRSTROW = 2, LASTROW = 224
    However a few files have many more records.  I'd like SQL Server to dynamically figure out the first and last rows with data, but I don't know if that's possible.  Can someone confirm?
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

    Nope, you would need read the files from some program. Could be a CLR stored procedure if you want to do it from SQL Server. But from BULK INSERT alone, no.
    Erland Sommarskog, SQL Server MVP, [email protected]

Maybe you are looking for

  • HT201303 I no longer have a credit card I would like to remove credit cards from my account and redeem my iTunes cards

    I no longer have a credit card I would like to remove credit cards from my account and redeem my iTunes cards

  • Ipod nano won't display video through xtremeMac tango

    I have an extremeMac tango which I use to play videos off of my 5th gen ipod video (or classic) 60gb. We recently got a brand new ipod nano 5th gen with video 16gb and it will not play the recorded videos through the tango. Any suggestions?

  • Methods in XML--pL help

    I have string...as String xstr="<?xml version=\"1.0\"?>\n"+ "<UserGroups>\n<u_bit><![CDATA[1]]></u_bit>\n"+ "<u_title><![CDATA[public]]></u_title>\n<u_description><![CDATA[Pages are available to all visitors - no restrictions are applied]]></u_descri

  • Using iTunes with Two Libraries Simultaneously.

    In the living room I have a Mac Mini with a large external drive running iTunes that I use as a media server. I recently got a new TV for the bedroom and have hooked my MacBook up to it. My laptop has the iTunes library that is synced with my iPod an

  • Negative Edge Detection DI

    Hello, I want to read in several counter inputs in my USB-6008 but this has only one counter input. The frequency of the pulses (to read) isnt high so i thought maybe i could use a digital input. When the input is high, a certain value has to be incr