Percent Change calculation

HI,
I'm trying to calculate Percent change of complaints that were registered against our Vendors.
The report generates 2 year data grouped by year. The report then calculates the difference between (current year - last year).
All that works great the problem is when I need to calculate the percent change b/w current year and last year and where last year= 0.
the formula is such...
If ({@Lastyear Count})<>0 then
ToText(Round({@Difference}/({@Lastyear Count}) * 100, 1), 1) 
This is placed in the summary section of a Crosstab.....It just picks up the "Count" and doesnt give me the option to "Sum" on it.
Using "Count", it just adds the current year and Last year numbers.
Any help will be greatly appreciated.
Thanks!!

Thank you guys...
I knew how to change the calculation from a count to a sum but the formula itself was not calculating the desired results.
Haven't tried the formula without the "totext" function yet. Let you know how it goes....
Thanks for your response.

Similar Messages

  • Previous Month, Current Month, Percent Change

    Post Author: lcrawfor
    CA Forum: Formula
    I need to create a report which shows the count of orders for the previous month, the current month and the percent change. An example follows.I suspect I need to use sql expressions but I can't figure it out. Anbody else know how to do this?Crystal Reports X1, SQL  Server 2005Orders tableCUSTNUMB       VARCHAR(15)ORDER_DATE    DATETIMEREGION             VARCHAR(10)ORDER_NUMB   INTOrders Monthly Summary ReportRegion                     2007 - 07                           2007-08                Percent ChangeEast                           3,478                                 4,568                         31%North                          2,364                                 2,578                          9%South                         7,634                                 7,189                         -6%West                         1,891                                  2,231                        18%Total                        13,665                                16,566                          21%

    Post Author: Jagan
    CA Forum: Formula
    Simplest way would be to use a Command or view to return the count grouped by region,month and just report off that.
    Another way I think will work is:
    Group on Region (group 1) then Date (group 2).
    As you've only got two months of data, presumably restricted by the record selection formula, implicitely ordered by the grouping, in the group 1 header you'll be 'looking' at the 1st month's 1st record so use a formula to calculate and store the count for the 1st month:   count({table.x}, {table.date}, "monthly")
    In group 1's footer you'll be 'looking' at the 2nd month's last record; that month's count is also  count({table.x}, {table.date}, "monthly");Suppress the details etc., print these in group 1's footer and use to calculate the %change
    Of course, this assume that there's always data for both months, but it's not too tricky to account for this if necessary.

  • Formula to get percent change

    I am trying to calculate percent change from last year vs. this year.  I have pivot table set up to show the two years but I cannot find a formula that will allow me to refer to one time frame versus the other.
    Ex:                  2008     2009        %Chg
             item1         12         15      ______
             item2         17         14      ______
    I want to be able to create a third metric which shows % change in the pivot table.
    Is this possible?

    Hi,
    Is your Pivot table a crosstab you created in Crystal? 
    If it is a Crosstab, the best way to do something like this is with a running total. 
    Try this: 
    1)  Right-click the cell for your detail amount and select Format Field.  Do this in the Report Designer and not the Crosstab Expert. 
    2)  In the Common tab, you will see a format formula button for Display String.  This will open the formula editor. 
    3)  Create a formula like:
    WhilePrintingRecords;
    NumberVar PrevYear;
    NumberVar CurrentYear;
    Select GridRowColumnValue ({table.MyDate})
        Case 2008    :PrevYear := CurrentFieldValue
        Case 2009    :CurrentYear := CurrentFieldValue;
    ToText (CurrentFieldValue, 0, "", "");
    The result of this formula must be a string which is what the last line will do. 
    4)  Now in the total column, right-click the Sum field and select Format Field. 
    5)  In the Common tab, press  the button for Display String. 
    6)  Write the following formula to display the percent: 
    WhilePrintingRecords;
    NumberVar PrevYear;
    NumberVar CurrentYear;
    If PrevYear <> 0 Then
       ToText ((CurrentYear / PrevYear) * 100) & "%"
    Else "0.00%";
    Good luck,
    Brian

  • How to calculate the Percent change in a dynamic

    hi All,
    I'm trying to get the percent increase/change of two dynamic
    colums.  In my report, the user has a checkbox where he can select two colums to calculate the percent growth.
    My DataSet is PilarName, Calification(is a decimal value) and Period (this is a string).  I created the Matrix this way:
    PilarName [Period]
    [PilarName] [Calification]
    Which give me these values:
    So, now I need to create another column to calculate the percentage change between these two colums.  I tried this:
    I added a Adjacent column group for Period column and I grouped by the calculated column "ColumnDiff".  Add the following expression.
    =(SUM(Fields!Calificacion.Value)- Previous(SUM(Fields!Calificacion.Value),"ColumnDiff"))/Previous(SUM(Fields!Calificacion.Value),"ColumnDiff")
    After that I get: 
    I'm getting the sum of the two columns instead.
    Any clue about what I'm doing wrong? Please help me, I've been looking for the answer but any solution works for me.
    Luis Carlos

    Hi Luis,
    According to your description, you have a report with different dynamic columns. Now what you want is show your user percentage growth in your matrix report after your user select two of those columns (I think you may use parameter to achieve your “checkbox”
    function). Is my understanding correct?
    In Reporting Service, we can’t calculate dynamic columns with our build-in arrogation functions. So we need to add custom code into our report, and call those functions which defined in custom code in our expression. We have tested your scenario in our local
    environment. Here are steps and screenshots for your reference.
    Go to your Report Properties, add the custom code below into your report:
    Dim Shared Num1 As Double
    Dim shared Num2 As Double
    Public Function GetCalification(Calification as Double,Type as String,Type2 as String) 
    If Type = Type2 Then
       Num1=Calification
    Else
       Num2=Calification
    End If 
    Return Calification 
    End Function
    Public Function GetPec()
    Return (Num2-Num1)/Num1
    End function
    Create a matrix. Put PilarName into Row field, put Period into Column field. In Data field, put the expression below into the textbox:
    =Code.GetCalification(Fields!Calification.Value,Fields!Period.Value,Parameters!Period.Value(0))
    In our sample report, we created a parameter (named Period) for selecting two columns. You can replace “Parameters!Period.Value(0)” with your own parameter.
    Add an outside column at right (%Growth), put the expression below into the textbox:
    =Code.GetPec()
    Save and preview. The matrix and result looks like below:
    Reference:
    Custom Code and Assembly References in Expressions in Report Designer (SSRS)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Is it possible to change calculation schema in Purchase Info Record

    Hello friends,
    just one question. I have calculation schema assigned to PIR -> RM0002 ,can I changed it and how.
    I have tried with assigning vendor to certain (other ) group that belongs to other calculation schema without success.
    I hope you can help with ideas.
    Thanks in advance I am waiting for feedback !!!

    If you want to assign the diff schema for diff vendor than you have to create diff pricing procedure the reason is in the Pricing you are using Gross price condition PB00 which is assigned to RM0002.
    so you need to create new supplement schema like RM0002 and then assigned to your Gross price condition and then assign to your main pricing procedure
    Than create new schema group and assign that to vendor.
    M/08 for pricing procedure
    M/06 for condition.

  • How to compute the percent change between 2 cells results

    I'm trying to compute the percent of change (whether it be positive or negative) between the values in 2 cells, each of which is displaying the sum of a column of numbers entered manually.
    I'm currently using the following formula, and it seems to be working, but I'd really like to know if I'm accomplishing the result using the "correct" method (i.e. the correct convention).
    Any comments or corrections would be appreciated.
    Current formula:
    =Cell A/Cell B-100%
    Is this the best method/formula?
    Thanks in advance,
    Ron Herrmann

    In fact the formula would be
    =A/B-100%
    or
    =B/A-100%
    given which percentage you which to know
    I often use a differerent one:
    =(B-A)/A ans of course I apply the percent format to the resulting cell.
    I don't know whih is the more efficient.
    Yvan KOENIG (VALLAURIS, France) dimanche 18 octobre 2009 12:58:27

  • Changing calculations based on the department

    Hi ,
    If i have a report that calculates the late times of the employees , and i want for a particular department to make different calculations for the late time , which is making the late time after 2:30 pm instead of 4:30 for the other departments,
    whats the best and easiest way to do that ? ,
    do i have to group my report by departments or can i just do that based on the employee's data ( department_code )..
    Thanks..

    I would create a new column in the DEPARTMENTS-table which contains the "basis" for for latetime-calculation and then do the calculation inside the database in a view. Then, let your report just select the data from that view.

  • How can I use filters to show sequential quarters in a table - Heat Map

    I need to sum sales for this quarter and last quarter, then do a percent change calculation in one table in 11g
    It needs to look like this:
    Product X, Last Qtr, This Qtr, % Change
    Prod_123, $100, $150, 50%
    I've tried creating one analysis for "Last Qtr" and an identical analysis for "This Qtr" and then tried using each as a filter for the two sales amounts but it isn't working.
    I know this is possible as I've seen articles written about this - but no examples or screen pictures so far.
    Anybody know how to do this?
    Thanks in advance!

    sorry but I still don't see how that would work.
    Create a new query - Start with "Fiscal Year" and Filter it for 2012. Add Fiscal Month number and filter it for "11;12", last add the "Sales Amount" fact. You should get a result with two rows, one for month 11 and one for month 12, each with a "Sales Amount" like this:
    Fiscal Year Fiscal Month Number Sales Amount
    2012 11 $100
    2012 12 $150
    The problem is that I need month 11 and month 12 as separate columns on the same row so I can do a calculation on them. Like this:
    Fiscal Year Month 11 Sales Month 12 Sales Month12/Month 11
    2012 $100 $150 1.50
    This is what I am doing that is not working:
    1) With the first analysis above - set the month filter to "11" and save the analysis as "Month 11 Sales Amount"
    2) With the first analysis above - set the month filter to "12" and save the analysis as "Month 12 Sales Amount"
    Now I have two analysis to use with the "is based on results of another analysis" filter in a third analysis. One filter anaysis for each month.
    3) With one of the above two analysis - remove the filters and save as "Month 12/Month 11 Sales Amount"
    4) Add another "Sales Amount" column to the analysis - so now we have a Fiscal Year, Fiscal Month Number, Sales Amount, Sales Amount columns
    5) Add filter to the first "Sales Amount" column using the "is based on results of another analysis" option and select the "Sales Amount" column of the "Month 11 Sales Amount" analysis
    This results in only the Month 11 sales amount being returned.
    6) When I add the Month 12 Sales Amount analysis as a filter for the second "sales Amount" column - as expected - no values are returned....
    So - How do you get this:
    Fiscal Year Month 11 Sales Month 12 Sales Month12/Month 11
    2012 $100 $150 1.50
    Without using SQL or Pivot views?

  • APO-DP - Change in Calculation Type of Key Figure in Production Environment

    Hi Team,
    I wish to know how to make a change in Calculation Type of Key Figure in Production Environment. I wish to change calculation type from "P" to "S" and also wish to enter Disaggregated Key Figure.
    Regards,
    Tarun Jha

    HI,
    The TR will not move the changes as you are expecting here.
    Any changes to planning area, below 5.0 need to de-intialize the planning area.
    just like
    1. hold the latest back up
    2. de-intialize planning area
    3. make the required changes to planning area
    4. initialize planning area and do conisistency checks
    5. load back the data to planning area at all CVC level
    all the steps need to perfom, in Dev and Quality and Production servers,
    Plan the activity for a weekend so that users will not get disturb*
    All the best
    ARUN R Y

  • Service tax base amount for calculation : to be changed

    Hi
    i have and PO order with basic price say for 100 /- on which it is calcuating service tax 12% , e-cess 2% hcess--1 .This is coming thru tax code from the tax procedure and these taxes service/ecess /Hecess is to be posted to sepearte G/L account.This is working fine.
    Now my requirement is that i want to calculate service tax on some % of the base price say 70 % of the base price. The % will always be changing .i want to calculate service tax on the 70/- not on 100.
    i want that system should post this 100 /- to cost of service but the tax should be on whatever percentage i make .Here this is 12.36 % on 70 not on 100 at the time of invoice posting.
    please guide me
    regards

    Hello Sunny,
    discount on services taxes is not in scope of standard SAP CIN.
    I just faced same problem with one of our client, I have interacted with SAP and they give me this reply. They are working on this solution
    However for 1 qty it is working. for that you do following
    create condition called ZSER for example (copy condition from discount condition)
    this is used for change calculated call in purchase order.
    activate taxes at service level.(thru SPRO--- IMP step)
    also check pricing procedure means seq in OMQ3 to have correct calculation
    It will only work for one quantity, if qty in po is more than one then it will not work.in bill passing it will calculate tax for all the quantity.
    This must be a transportation bill.
    Reward points if useful
    Regards
    Kedar Kulkarni
    Message was edited by:
            KEDAR KULKARNI

  • Calculating Percentages of expressions in a matrix

    I am having difficulty calculating the percent change in an SSRS 2008 report using a matrix and groupings
    I am getting errors NaN or infinity or the incorrect %.
    Goup 1
    Group 2
    Actual
    Budget
     Variance
    Percent Change
    Actual
    Budget
     Variance
    Percent Change
    Type 1
    1.55
    1.64
    -0.09
    (5.24%)
    1.42
    1.53
    (0.1043)
    (6.84%)
    Type 2
    8.11
    7.36
    0.76
    10.29%
    0.00
    0.00
    0.0000
    0.00%
    Type 3
    0.95
    0.98
    -0.02
    (2.33%)
    0.58
    0.71
    (0.1353)
    (19.00%)
    Type 4
    2.15
    2.01
    0.14
    7.13%
    1.22
    1.20
    0.0238
    1.99%
    Type 5
    2.15
    2.12
    0.03
    1.47%
    0.96
    0.92
    0.0328
    3.55%
    Type 6
    2.27
    2.12
    0.15
    7.32%
    0.90
    0.73
    0.1763
    24.21%
    Type 7
    1.69
    1.41
    0.28
    19.98%
    0.83
    0.78
    0.0532
    6.85%
    Type 8
    2.70
    2.65
    0.05
    1.90%
    0.97
    1.01
    (0.0401)
    (3.98%)
    Grouped by Type
    The fields are expressions as follows: 
    Actual:  =IIF(Sum(Fields!ActualDRGWeight.Value)>0,Sum(Fields!ActualDRGWeight.Value) /sum(Fields!Current_Actual.Value),0)
    Budget: =IIF(Sum(Fields!BudetDRGWeight.Value)>0,Sum(Fields!BudetDRGWeight.Value) / Sum(Fields!Current_Budget.Value),0)
    Variance: =(sum(Fields!ActualDRGWeight.Value)/sum(Fields!Current_Actual.Value))-(sum(Fields!BudetDRGWeight.Value)/sum(Fields!Current_Budget.Value))

    Hi ,
    It might be because of two reasons :
    i)make sure all the Fields involved in calculation are of compatible data type
    ii)IIF - Divide by  zero error -
    http://www.allaboutmssql.com/2013/09/ssrs-divide-by-zero-error-myth-of-iif.html
    Suppressing Null or Zero Values at Run Time
    http://stackoverflow.com/questions/5471817/ssrs-2008-dealing-with-division-by-zero-scenarios
    sathya - www.allaboutmssql.com ** Mark as answered if my post solved your problem and Vote as helpful if my post was useful **.

  • Web Analysis: Percent Function & Missing values

    Hi All,
    Our users have made some complaints after we upgraded to Web Analysis (from Analyzer) where they're seeing 'Evaluation Error' on columns in reports. It was an easy fix for Sum'd columns where we treated #Missings as '0', however we're having a difficulty with the Percent columns/calculations.
    The main problem is users do not want to see a great big Evaluation Error in the middle of a report. Ideally we'd have something like N/A which was small and unobtrusive.
    I dont' think we can change the options for Missing Values in the Calc Def because each option presents a different problem: Exclude means divide by nothing, treat as 0 means divide by 0, include means divide by missing. All result in an evaluation error.
    Has anyone got any suggestions? The simplest sounding solution would be to somehow change the appearance of Evaluation Error but I don't know if that is possible.

    Gotcha. Ok. Have you thought about creating a new hidden calculated ColumnB whereby you multiply the values in ColumnA by -1 and then set your formatting based on the result in ColumnB. If the value in B is positive then you know A was a negative number so you can go from there, in a round about way? I don't have time at the moment to think it all the way out but something to think about. If your formatting involves just colors you could use Traffic Lighting to set the color on ColumnA based on result in ColumnB. Traffic Lighting out of the box is limited but it's a start until you have time to build your own.
    -Karen

  • BEx Query: Percent Share based on characteristic

    My question is around a query that follows this sort of layout:
    Order  |  Doc No.  |  Account  |  Type  |  *Amount*
       1            1          1          A         20
       1            1          2          A         30
       1            2          3          A         40
       2            3          4          A         50
    I want to calculate the percent share by Doc No. so in this example, I'd want it to show like this:
    Order  |  Doc No.  |  Account  |  Type  |  *Amount*  |  *Percent*
       1            1          1          A          20         40%
       1            1          2          A          30         60%
       1            2          3          A          40        100%
       2            3          4          A          50        100%
    I've tried doing a forumla based on amount with Aggregation of summation on Doc No. and that didn't work. I also tried some of the other percent functions but unless the exact doc no. is drilled down on, they show the percent share for the entire report which doesn't work either. Any ideas? I feel like I've done something like this before but can't seem to get it to work! Points to an answer that yields the result I'm looking for!
    Thanks!
    Edited by: Christopher Deaner on Jan 16, 2012 10:55 PM

    Let me see if this example of what I'm seeing makes more sense:
    Order  |  Doc No.  |  Account  |  Type  |  *Amount*  |  *abs(Amount)*  |  *Percent*  | Expected Percent
       1            1          1          A          20            20          200%           40%     
       1            1          2          A         -30            30          300%           60%
                                       +Result+     -10           -10
       1            2          3          A          40            40          100%          100%
       2            3          4          A          50            50          100%          100%
    The absolute value of the Amount column is calculating the result of the original values (with the original signs). This result is being used in the Percent (%CT) calculation which is causing the calculated percent to be wrong. I tried changing the "Calculate Result as" setting to Summation which corrected the result row (in the above example it would show 50 for the abs(Amount) column) but the %CT calculation is still incorrect.

  • Net Change in Cross-Tab

    Post Author: EdHaberstroh
    CA Forum: Charts and Graphs
    I would like to report the net change or percent change between columns in crosstab report.  is that possible?

    Hi Oddmar,
    design studio in current release (1.4) is taking the date / time formats from user locale which is set by your browser. You are probably in EN, therefore the English formatting is taken.
    see admin help, https://websmp109.sap-ag.de/~sapidb/012002523100018707472014E/ds14_admin_bip_en.pdf
    8.4 Regional Formats for Numbers, Dates and Times
    The format for numbers, dates and times varies according to the defined language setting in the BI launch pad or
    the Web browser.
    ● If you define a language in the BI launch pad under Preferences Locales and Time Zone Preferred
    Viewing Locale , this language is used, and numbers, dates and times are displayed in the appropriate
    format.
    ● If you select Use browser locale under Preferences Locales and Time Zone Preferred Viewing Locale ,
    the Web browser language is used, and numbers, dates and times are displayed in the appropriate format.
    --> this means the SU01 settings are not evaluated (yet, as probably this extension needs to come at some time, not sure if for BIP deployment as this one can be used against many ABAPs.).
    Karol

  • Calculated keyfigures not defined correctly error when executing query

    Hi Experts,
    I changed calculations in the calculated keyfigures and saved successfully.
    when I execute the query in BI7 Bex, I am getting errors like query element not defined correctly in the query. when I look into query in the designer its giving info messages for many calculated keyfigures saying reusable and saving can influence other queries.
    I reverted back the changes but the errors still coming up. I tried to copy the query and run it ..still didnt helped..
    Please suggest me with the solution..
    Quick replies are much appreciated and awarded.
    Thanks
    Vanaja

    Hi,
    The calculated keyfigure is the difference of two other calculated keyfigures...
    I tried to re-drag and drop into keyfigures column and didn't worked and still getting the errors.
    Please suggest some more..
    Thanks
    Vanaja

Maybe you are looking for

  • Access denied when trying to install itunes on windows 7

    when trying to install itunes I get a message access denied. using win 7 i have read that a certain windows update can cause this. can anyone  provide any information on how to fix this?  I've tried to remove this, but in control panel-update history

  • How to show the field Item foreign name in Inventory Audit Report

    Hi I can't find the field Item foreign name showing in Inventory Audit Report.I want to link with the table OITM in PDL in order to show Item foreign name in paper report,but whatever I do, it seems doesn't work. plz tell me how  to do .thx. Edited b

  • Upgrading from RH7 to RH8: Problem with user-defined variables

    Example: Before upgrade: <uservariable name=Product_name1 x-showvalue x-value=MyProduct>MyProduct</uservariable>. After upgrade: <?rh-udv_start name="Product_name1" ?>MyProduct<?rh-udv_end ?> . Notice that there is now a space before the period. Any

  • Adobe Reader 'Basic' and LE 2.5

    Hi I updated to Symbian Anna and looks like some effort has gone into the Adobe Reader, it's noticeably faster for a file that is 20 mb in size. And it reformats quicky and I can use the multi-touch to zoom. Still no full-screen though which sucks ma

  • Bug in SP5 ?

    Hi, I recently applied SP5 to weblogic 5.1 and I'm now running into following problem. I have implemented a custom security realm. I have created a group called "admin" in my database and give this role to a user "org\user" . ( JFYI, I encode usernam