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

Similar Messages

  • 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

  • How to calculate the Current APC (Acquisition and Production Cost)

    Hi,
    Please help me how to calculate the Current APC.
    The Current APC (Acquisition and Production Cost) is a calculated value based on Previous Year Acquisition balance plus any value changes up to the time of the report.
    The Asset History Report (RAGITT_ALV01) calculates the Current APC value &
    The Current APC can also be found in the Asset Explorer (transaction code AW01N) under Country Book 10/ Posted Values tab then the line “Acquisition Value” and column “Posted values”.
    I suppose that the calculation of Current APC (Acquisition and Production Cost) is getting done in the GET statements in the report RAGITT_ALV01, but unable to find the actual logic.
    Please help me.
    Thanks in advance,
    Satish

    Hi,
    you'll find the logic in fm FI_AA_VALUES_CALCULATE
    A.

  • How to calculate the Current APC

    Hi,
    Please help me how to calculate the Current APC.
    The Current APC (Acquisition and Production Cost) is a calculated value based on Previous Year Acquisition balance plus any value changes up to the time of the report.
    The Asset History Report (RAGITT_ALV01) calculates the Current APC value &
    The Current APC can also be found in the Asset Explorer (transaction code AW01N) under Country Book 10/ Posted Values tab then the line “Acquisition Value” and column “Posted values”. 
    Thanks in advance,
    Satish

    Hi,
    I suppose that the calculation of Current APC (Acquisition and Production Cost) is getting done in the GET statements in the report RAGITT_ALV01, but unable to find the actual logic where it is being done.
    Please help me.
    Thanks in advance,
    Satish

  • How to calculate the number of sent/received emails of a certain domain

    Thank you for what you have helped me with!
    How to calculate the number of sent/received emails of a certain domain in a certain period? It is Messaging Server 5.2, Directory Server 4.2. Is there a log option for this?
    Thank you.

    Not sure where you find, "LOG_MESSSAGE_ADD". I don't actually find this option in the documentation.
    The domains that mails are coming from and being sent to are certainly logged in the normal mail.log, so why mess with additional logging options? If you're talking about "LOG_CONNECTION", I actually see no additional data that is useful to you.
    If you decide to change the option.dat, you do indeed need to
    imsimta cnbuild (note, it's not cnrebuild)
    imsimta restart
    If I were facing the same issue, I'd be looking at the log parsing perl script, and simply modifying it to do what I wanted.

  • How to calculate the size of web forms in hyperion planning?

    Hi Experts,
    I am trying to calculate the size of planning forms in Hyperion smart view., but i am unable to find out the way to calculate.
    Can you pls explain how to calculate the size of web form in Smart view?
    --- Srini.

    Hi Srini,
    First, here is what Oracle says:
    Data Form Size Estimation:
    To get a rough estimate of data form size, open the data form and select File > Save As from the browser. The size of the .HTML file is the portion of the data form that changes based on grid size. The .JS files remain the same size and can be cached, depending on browser settings. Information such as data form definitions, pages, and .gif files are not compressed when data forms are opened and sent to the Web browser.
    I have not been able to find out using their method.
    In any case, you can find out the size of grid by using below
    1. Right click on the form grid and click "View source"
    2. Save the source file as "Example.html"
    3. Right click the saved file and click "Properties"
    4. The Form size whould be same as that of file..
    Let me know if it helps.
    Cheers
    RS

  • How to calculate the number of operations in Undo/Redo stack?

    How to calculate the number of operations in Undo/Redo stack?
    I tried to override UndoManager.pushUndo method and increment "operationsCounter" there, but pushUndo is called each time I make a change in text.
    Another idea was to override EditManager.finalizeDo and use "operationsCounter" there, but finalizeDo is private...
    Do you have any idea?

    Hi Richard,
    Thanks for the reply. I suggested that existed the more simple way to implement this

  • Hi frinds ,how to calculate the  totals in smartforms

    1)how to calculate the  totals in smartforms .

    Hi,
        To calculate totals and sub totals in sap scripts you can use subroutines.
    Say if you have to add the unit price (KOMVD-KBERT) then in the main window whereever tat value is picked write this routine
    /: DEFINE &TOT_PRICE&
    /: PERFORM F_GET_PRICE IN PROGRAM /:USING &KOMVD-KBERT& /:CHANGING &TOT_PRICE& /:ENDPERFORM
    Then write the variable where ever you want it to be printed (mostly it will be in footer window)
    Then create subroutine pool program and you have to write the code.
    FORM F_GET_PRICE tables int_cond structure itcsy
    outt_cond structure itcsy. data : value type kbert.
    statics value1 type kbert.
    Read int_cond table index 1.
    value = int_cond-value.
    value1 = value1 + value.
    Read outt_cond table index 1.
    outt_cond-value = value1.
    Modify outt_cond index 1.
    ENDFORM.
    regards..

  • In labview,how to calculate the parameters of the bilinear model that simulates the generation electroencephalogram?

    Dear Sir or madam:
    I have collected a lot of electroencephalogram data, which looks like a continuous sine wave plus a noise signal. what i want to do now is to fit the data with the bilinear model as the attached jpg file. the problem is the parameters of the model are changing with the evolution of the signal. would someone like to tell me how to calculate the parameters in the bilinear model?
    thank you very much
    Attachments:
    Bilinear_Model.jpg ‏33 KB

    I can point you in the right direction, but probably not answer your question really well. If you have the pro or full distribution of LabVIEW, you can use the curve fitting VIs to match any set of data to a theoretical curve. The curve fitting Express VI may do all you need to do (use the nonlinear option). To get the signal evolution, break your data into pieces and process each. If you need to average a bit, you can use a sliding window of your data for each analysis, moving the window less than the window width for each analysis.
    There are a plethora of curve fitting techniques built into LabVIEW - matrix operations, linear and log linear fits, Levenberg-Marquardt methods, downhill simplex, etc. You will probably need to experiment a bit to get a stable
    algorithm for your case. Check your literature for ways other people have done this. There may be an easy, stable method out there.
    If you are unfamiliar with curve fitting techniques, or you do not have the pro or full versions of LabVIEW, I would recommend "Numercial Recipes in C" by Press et. al., published by Cambridge University Press. The chapter on Modeling of Data will get you going. The rest of the book will provide any background you need.
    This was a very general answer. If you need something more specific, let me know. Be aware that this type of problem usually requires some trial and error to get right. The answers should be tightly scrutinized before being believed.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • [svn:fx-trunk] 10545: Make DataGrid smarter about when and how to calculate the modulefactory for its renderers when using embedded fonts

    Revision: 10545
    Author:   [email protected]
    Date:     2009-09-23 13:33:21 -0700 (Wed, 23 Sep 2009)
    Log Message:
    Make DataGrid smarter about when and how to calculate the modulefactory for its renderers when using embedded fonts
    QE Notes: 2 Mustella tests fail:
    components/DataGrid/DataGrid_HaloSkin/Properties/datagrid_properties_columns_halo datagrid_properties_columns_increase0to1_halo
    components/DataGrid/DataGrid_SparkSkin/Properties/datagrid_properties_columns datagrid_properties_columns_increase0to1
    These fixes get us to measure the embedded fonts correctly when going from 0 columns to a set of columns so rowHeight will be different (and better) in those scenarios
    Doc Notes: None
    Bugs: SDK-15241
    Reviewer: Darrell
    API Change: No
    Is noteworthy for integration: No
    tests: checkintests mustella/browser/DataGrid
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-15241
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridBase .as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridColu mn.as

    Hi Matthias,
    Sorry, if this reply seems like a products plug (which it is), but this is really how we solve this software engineering challenge at JKI...
    At JKI, we create VI Packages (which are basically installers for LabVIEW instrument drivers and toolkits) of our reusable code (using the package building capabilities of VIPM Professional).  We keep a VI Package Configuration file (that includes a copy of the actual packages) in each of our project folders (and check it into source code control just as we do for all our project files).  We also use VIPM Enterprise to distribute new VI Packages over the network.
    Also, as others have mentioned, we use the JKI TortoiseSVN Tool to make it easy to use TortoiseSVN directly from LabVIEW.
    Please feel free to contact JKI if you have any specific questions about these products.
    Thanks,
    -Jim 

  • How to calculate the coordinate after implementing Affine Transformation?

    Hi, guys!!
    I am working on a Map makeing program, like MS Visio. Then, I need to put an icon on the working space. And the icon can be moved, rotated, and scaled, when mouse drags handles (8 small circles) around the icon. However, the problem is that after the icon is scaled or rotated using AffineTransform class, I do not know how to calculate the coordinate to paint the mouse handles.
    Please give me your suggestions!! Thanks in advance!!

    Sure. The idea is that you track your translations, scaling, and rotation separate from the AffineTransform. That way, you know what you need to revert:
    AffineTransform at = new AffineTransform();
    at.translate(20, 20);
    at.scale(2, 2);
    at.rotate(45, 10, 10);
    At this point, let's assume you want to translate again. First you have revert the rotation and the scale:
    at.rotate(-45, 10, 10);
    at.scale(1/2, 1/2);
    at.translate(10, 10);
    In order to do this, you need to track your scaling and rotation values when you change them. If this isn't feasible, it's certainly possible to derive the values from the AffineTransform, but that's a bit tougher.
    Michael

  • How to calculate the switching score

    Dear Experts,
    As per ISO 2859, the normal inspection can be changed to reduced Inspection if the production is steady, current value of switching score is 30, approved by responsible authority. My request is how to calculate the switching score?. I follow G-I inspections and AQLs 1.5.
    Regards,
    Krish

    Hi Sujit,
    Thanks for your reply.
    I have find work arround for switching score. but my problem is we are applying switching rule to multiple sample,
    for that as per ISO if the 4th sample is used score will be 0 but the batch is accpeted, as per dynamic modification set up this consider as OK lot but as per the ISO below30 score we will not go for next reduced inspection. if it is rejected then we will follow work arround. How to control in DMR? Is there any user exit is available .
    regards,
    krish

  • SCB68 how to calculate the correct resistor

    Hi,
    sorry I am a new NI user.
    I didn't understand how to calculate the correct resistor to apply in scb68 in order to obtain a differential signal.
    My application requires an acquisition of a differential voltage channel of 0-5V.
    Can I use the ach+ and ach- channels without change anything on scb68?
    if no, how can I find correct settings?
    I read on scb68 manual page 5-2 "Conditioning Analog Input Channels" but I didn't understand wot to do.
    thank you
    Sarah

    Hi,
    Last question first; the cable impedance is at higher frequencies. So with you (almost) DC application don't worry about this cable impedance.
    I would choose resistors of 100k as the lowest value as bias resistors.
    You mentioned the power consumption of your sensor (transmitter ?) Does this mean that the sensor is powered through the same lines ?
    I don't know how you want to 'cascade' your sensors depends on your sensors. Normally you measure each sensor with a different input.
    Can you post (or link to) the datasheet of the sensor ?
    Message Edited by K C on 12-12-2007 10:44 AM

  • How to get the "last changed by" for a set of function modules?

    How to get the "last changed by" for a set of function modules?
    is there any table to get it??

    See [this|Re: Date of creation of function module] I posted earlier.
    >TFDIR will give you the name of the function group program and the include number.
    >E.g. SAPLZFUNCGROUP Include 01.
    >From this you can construct the include name: LZFUNCGROUPU01.
    >You can look this up in TRDIR to find the creation date (CDAT) of the function module.
    In your case, you need unam and udat.
    matt

  • How to calculate the unit for RATE?

    Hey All,
    I am not sure if there is something standard for this or not.
    I am calculating the 'Rate' by using 'Value/Amount' and 'Quantity' as follows -
    Rate == Value /  Quantity
    I need to calculate the unit for the rate as below -
    Rate unit == Value unit (Currency) /  Quantity unit (Base_uom) 
    (for example -
    if value is 1000 USD and quantity is 10 TO then Rate should come out as 100 USD / TO)
    Could anyone please suggest how to calculate the unit in this case?
    Many Thanks!
    Tanu

    Hi,
    Go through the below link it may give some idea
    http://help.sap.com/saphelp_nw04/Helpdata/EN/19/1d7abc80ca4817a72009998cdeebe0/content.htm
    Regards,
    Marasa.

Maybe you are looking for