SSRS Expression to calculate percentage with the denominator being the first value in the same column group in a matrix report

Hello, Expert,
Could you please help me with the following problem? Thanks in advance!
I have designed the matrix report (SSRS 2012) with database table structure looks like below.    
Week           
Version
     Count
Week1
V1.1
4000
Week1
V1.2
4000
Week1
V1.3
4000
Week2
V1.1
3000
Week2
V1.2
3000
Week2
V1.3
3000
Week3
V1.1
2000
Week3
V1.2
2000
Week3
V1.3
2000
Week4
V1.1
1000
Week4
V1.2
1000
Week4
V1.3
1000
The matrix report displays like below. Column grows based on no of Week in the table.   
Week1
Week2
Week3
Week4
V1.1
4000
3000
2000
1000
V1.2
4000
3000
2000
1000
V1.3
4000
3000
2000
1000
What I want to do now is: instead of the Count values, I need to calculate the percentage of each week over the
Count in Week1 so that each cell displays Count(Week2)/Count(Week1), Count(Week3)/Count(Week1), etc. What is the SSRS expression for that? I’m new to SSRS, Please help!

Heidi,
Thank you so much for your reply and solution! Now I know how to get the first field in a group. But I can't apply your solution directly just yet because in order to explain my problem I simplified my data structure. My real data structure has a nested
group like this:
Week  VersionMajor VersionMinor Count
Week1  V1           V1.1         2000
Week2  V1           V1.1         1500
Week3  V1           V1.1         800
Week1  V1           V1.2         1000
Week2  V1           V1.2         500
Week3  V1           V1.2         200
Week1  V1           V1.1         2000
Week2  V1           V1.1         1500
Week3  V1           V1.1         800
Week1  V1           V1.2         1000
Week2  V1           V1.2         500
Week3  V1           V1.2         200
Here is the query for the above data:
SELECT 'Week1' AS Week, 'V1' AS VersionMajor, 'V1.1' AS VersionMinor, 2000 AS Count
UNION ALL
SELECT 'Week2' AS Week, 'V1' AS VersionMajor, 'V1.1' AS VersionMinor, 1500 AS Count
UNION ALL
SELECT 'Week3' AS Week, 'V1' AS VersionMajor, 'V1.1' AS VersionMinor, 800 AS Count
UNION ALL
SELECT 'Week1' AS Week, 'V1' AS VersionMajor, 'V1.2' AS VersionMinor, 1000 AS Count
UNION ALL
SELECT 'Week2' AS Week, 'V1' AS VersionMajor, 'V1.2' AS VersionMinor, 500 AS Count
UNION ALL
SELECT 'Week3' AS Week, 'V1' AS VersionMajor, 'V1.2' AS VersionMinor, 200 AS Count
UNION ALL
SELECT 'Week1' AS Week, 'V1' AS VersionMajor, 'V1.1' AS VersionMinor, 2000 AS Count
UNION ALL
SELECT 'Week2' AS Week, 'V1' AS VersionMajor, 'V1.1' AS VersionMinor, 1500 AS Count
UNION ALL
SELECT 'Week3' AS Week, 'V1' AS VersionMajor, 'V1.1' AS VersionMinor, 800 AS Count
UNION ALL
SELECT 'Week1' AS Week, 'V1' AS VersionMajor, 'V1.2' AS VersionMinor, 1000 AS Count
UNION ALL
SELECT 'Week2' AS Week, 'V1' AS VersionMajor, 'V1.2' AS VersionMinor, 500 AS Count
UNION ALL
SELECT 'Week3' AS Week, 'V1' AS VersionMajor, 'V1.2' AS VersionMinor, 200 AS Count
And my matrix table looks like this:
What I need to do is to calculate the percentage of each week over week1 for
1) V1 Total
2) V1.1
3) V1.2
I can't use your solution directly because I need to apply Sum function for each cell and the Sum function gives me error when I try to use it on the denominator
First(Fields!Count.Value,"VersionMinor"). If you could help me further to get to the final solution, I'd really appreciate it!!
Happy New Year!

Similar Messages

  • How to force the user to enter a value in the prompt

    Is there a way to force the user to enter a value in the prompt before they run the report?
    We have a customer specific dashbaord. The user has to enter a customer number in Dashbaord prompt on a first page of the dashboard. We store that value in a presentation variable. That presenatation variable value is being referenced in all the other pages of the dashabord. If the user does not enter a values in the first page and directly navigates to the other pages on the dashbaord, the reports on the other pages start to run for all the customers. Is there a way to force the customer to enter a value in the prompt before running any of the reports on the dashboard?
    Thanks!

    by Answer prompts, do you mean Column prompt?
    I can not use Column prompt in this senario as the user should not have to enter the same customer number over and over again when he navigates from one page to another on the same dashboards. If there is a way to default the column prompts then this would be an acceptable solution.
    I have already defaulted the prompt to a value as suggested in hte blog, but the issues occurs when the user erases the defaulted value. Is there are way to set the default value within the report?
    Can you please explaing mroe about option 3 regarding Java Script. Also please let me know what other options there are so that I can check whether they will fit my needs.
    Thank you very much!

  • Can HPCM calculate percentages to use in allocations as well as perform the allocations

    Hi All
    I have a client that is evaluating which products to purchase from the Oracle stack.  Unfortunately I don't know HPCM yet so I'm not sure of its capabilities.  I think they will definitely go with Hyperion Planning but they do some relatively simple allocations and I cannot decide whether or not they need HPCM.  They currently have a relational / access database that is used to calculate percentages to be used to allocate costs from back office to front office.  Whether they need to purchase HPCM seems to depend upon whether HPCM can calculate the percentages required for the allocation as well as perform the allocations.  The options as I see it are:
    1.  Replace legacy system with HPCM and use HPCM to calculate percentage and apply percentages to allocate costs
    2.  Keep legacy system for calculating percentages, upload percentages to HPCM and use HPCM to allocate costs
    3.  Keep legacy system for calculating percentages, upload percentages to Essbase and use Essbase to allocate costs
    4.  Keep legacy system for calculating percentages and allocating costs (not ideal as will require additional system interfaces of data from and to Hyperion Planning)
    I know HPCM uses Essbase, when I say Essbase above I mean Hyperion Planning.  I have advised the client that they ought to avoid option 4 but I am not clear enough on what HPCM can do to advise them on which of the other options is most suitable / cost effective.
    Any help would be appreciated.
    Regards
    Stu

    Hi Stu,
    the plain answer is Yes, HPCM can do such a simple task. In my private opinion, it would be a bit oversized.
    I want to add an option and put my vote on this:
    0.  Pull in a DB connection the required data into Planning and use Planning to calculate percentage and apply percentages to allocate costs.
    Regards,
    Philip Hulsebosch.
    www.trexco.nl
    p.s. To all users, close questions which were answered. Then we do not have to open them to see if we can help = saves us time to help others.

  • Any issues with server 2008R2 being a backup AD when the Primary AD is a 2003 that was upgraded from NT

    Someone recently told me if a customer has a Windows 2003 server that originally came from NT which was upgraded to Windows 2000, then upgraded to 2003 as their primary AD, if you add a 2008R2 server as a backup AD, it will upgrade the forest, but there
    is an issue with the global catalog not properly replicating to the 2008R2 backup server and thus if the primary Windows 2003 server were to crash the backup 2008R2 server will not be able to authenticate users.
    Can you tell me if this is true?  It seems rather odd to me that if the 2008R2 is able to become a backup controller without any errors and does not report any AD or replication errors in the event log that it would not work if the primary AD failed.
    Thoughts?

    This is not true & never heard/seen of anything as such. The AD database either on windows 2003 or 2008 R2 contains similar objects & attributes, but few groups are only created when you transfer PDC role to windows 2008 & above DC esp if you
    are using RODC.Also, there is no concept of primary & secondary DC from windows 2000 & above. PDC & BDC concepts existed in windows NT not any more.
    The DC with GC role have bit more information because it contains partial information of the objects in other domain too. So, i would be taking backup of the windows 2008 R2 DC. As long as DLF/FFL is not enhanced you can run windows 2003 & 2008 R2 DC
    in coexistence.
    My suggestion would be transfer FSMO role on the windows 2008 R2 DC becasue may be at some point of time you would get rid of windows 2003 DC to enjoy full features of windows 2008 R2 AD.
    Awinish Vishwakarma - MVP
    My Blog: awinish.wordpress.com
    Disclaimer This posting is provided AS-IS with no warranties/guarantees and confers no rights.

  • Can the license manager load the computer-based license first, instead of the user-based license?

    We have several machines in the lab with computer-based licenses on them and a number of techs with user-based licenses. When a tech needs to occassionally sign in as themselves, instead of the generic service account, the license manager attaches the machine to their user account. Not a problem until they try logging in to LabVIEW from their own PC again and they get the 14 day trial period notice.
    Is there a way to have the license manager look for the computer license first instead of the user license?
    Thanks for any help.
    Joe
    Solved!
    Go to Solution.

    Hi Joe,
    In the license file hosted on the license server, you may be able to manually change the "sort" tag in the file to modify the order in which VLM checks out licenses. Licenses are checked out in descending order (2, then 3, then 4, etc.). Typically, your license file is set up in a default order, but in special cases such as this, it may be beneficial to alter the order. To do this, follow these steps:
    1. Open the license file with a text editor (such as Notepad)
    2. Search for the "sort" tag. For instance, the "VLM_Core" entry will have a sort tag value will appear as "sort=first". Do not alter this value. VLM_Core should always be first.
    3. Change the sort tag value for the named-computer license to a value that is lower than the sort tag value for the named-user license. (e.g. "sort=2" for named-computer and "sort=3" for named-user). 
    4. Save the file and reinstall the license. 
    Let me know if you have any questions!
    Rick C.

  • What is the password when you first turn on the AP Extreme and view it in the Air Port utility?

    I have just purchased an Airport Extreme. When I plug in the Extreme and go to the Airport Utility it prompts me for a password. What is this password? Is is located on the box or within the material within the box in came in?

    If the AirPort Extreme is new, with factory default settings, the only thing that you will see is a globe when you open AirPort Utlity.
    Click on the Other WiFi Devices button, then click on AirPort Extreme xxxxxxx to start the setup utility for the AirPort Extreme and follow the prompts.
    Although you should not need it at this point, the factory default password is
    public
    If you are asked for a password and this does not work, then it is very likely that the AirPort Extreme has already been set up with another password.

  • "The class being compiled does not match the class that was imported"

    ----------Actions on timeline in
    sixSpices/updateSite/updateSite.fla----------
    import com.sixspices.updater.view.*;
    var calDrawer:CalendarView = new CalendarView(); //Listener /
    view
    ----------sixSpices/com/sixspices/updater/view/CalendarView.as
    file----------
    class CalendarView {
    public function CalendarView(){
    public function onRecieveData(listOfEvents:Array) {
    displayEvents(listOfEvents);
    public function displayEvents(listOfEvents:Array):Void {
    trace(listOfEvents);
    When I test the movie (updateSite.swf) in flash, it gives me
    the error:
    The class being compiled, 'CalendarView', does not match the
    class that was imported,
    'com.sixspices.updater.view.CalendarView'.

    Here is my file structure:
    sixSpices
    -->updateSite
    -->-->updateSite.fla
    -->-->updateSite.swf
    -->com
    -->-->sixSpices
    -->-->-->updater
    -->-->-->-->view
    -->-->-->-->-->Calendar.as
    If I move updateSite.fla to the folder sixSpices so that
    "com" is in the same folder as it, I get the same error.
    The following works with no problems (no similar error):
    ----------Actions on timeline in
    sixSpices/updateSite/updateSite.fla----------
    import com.sixspices.updater.model.*;
    var calModel:CalendarOverview = new CalendarOverview();
    //Broadcaster / model
    ----------sixSpices/com/sixspices/updater/model/CalendarOverview.as
    file----------
    import com.sixspices.updater.model.*;
    import mx.utils.Delegate;
    import mx.events.EventDispatcher;
    class CalendarOverview {
    public function CalendarOverview(){
    }

  • Display only first value of the repeated values  in ALV report

    Hi,
    Test Data
    Doc No   Net Val   billing Doc value Qty
    1000      2000.00    567850.00
    1000      2000.00    567850.00
    1000      2000.00    567850.00
    2000      6000.00    767850.00
    In this type of ALV Report in which only the First field value of the repeated value  should be displayed.
    Doc No   Net Val   billing Doc value Qty
    1000      2000.00    567850.00
    2000      6000.00    767850.00
    I can display document value as like expected result in SORT ORDER in LAYOUT but the Quantity value,Net value  which cannot be done in SORT ORDER in LAYOUT.
    Please tell me the suitable solution.

    For a Sales Order there are two Invoice.
    Sales doc     Invoice No    Billed Qty    Net value                     Qtywith  material no
    5000              900             234774.00    456.00000                 65             123
                                             234774.00    456.00000                 25             456
                                             234774.00    456.00000                 35             898
                                             234774.00    456.00000                 20             496
                          901            634774.00    256.00000                 50               746
                                            634774.00    256.00000                 10               456
                                            634774.00    256.00000                 20               545
                                            634774.00    256.00000                 30               869
    I  need to print this billed Qty and Net value  only once in first line and it should not be deleted.
    I need the result like this
    Sales doc     Invoice No    Billed Qty    Net value                     Qtywith          material no
    5000              900             234774.00    456.00000                 65                     123
                                                                                    25                     456
                                                                                    35                     898
                                                                                    20                     496
    5001              901            634774.00    256.00000                 50                       746
                                                                                    10                       456
                                                                                    20                       545
                                                                                    30                       869               
    The same value should not be repeated for Billed Qty and Net Value.
    I can do that for Sales doc in sort order in layout but i couldn't do for Billed qty and Net Value.
    Please  help.

  • How to get the text field in the header for only first page of the report

    Hi,
    I am developing reports in BI Publisher Enterprise where i am facing problem i.e., i have to get some text field in header,for only first page in the result but it is displaying in all the other pages of the report in result.So,please if you have any idea of how to solve it, please reply.It is required as early as possible.
    Thanks in Advance

    Invalid path? What are you doing? Writing the report output to an invalid directory?
    Where are your terms and conditions? It would be very easy just to put them in a database table and select them in your report query.

  • SelectOneChoice - showing the first value as the default?

    Using a selectOneChoice, how do you get the first value to show in the form as the default? It always displays a blank item when the form first comes up. I don't want the user to have to select a value for the defaults. I have 'selection required' on.
    --------- .jspx page ------------
    <af:selectOneChoice value="#{bindings.View1country.inputValue}".....>
    <f:selectItems value="#{bindings.View1country.items}"/>
    </af:selectOneChoice>
    -------- pagedef xml ---------------
    <list id="View1country" IterBinding="View1Iterator"
    ListOperMode="0" StaticList="true">
    <AttrNames>
    <Item Value="country"/>
    </AttrNames>
    <ValueList>
    <Item Value="United States"/>
    <Item Value="Canada"/>
    </ValueList>
    </list>

    thanks - I am using ADF BC read-only view objects, but I don't see anywhere to define the selection on the VO properties? I defined the list on the front-end .jspx page by adding a selectOneChoice and defining its properties.

  • How to Save the multiple selection check box values into the database

    i have the multiple selection check box implemented in UI through drop down list,i can choose the desired values from the drop down through checkbox, but i m unable to store these values and commit the values into the database all at a time.

    You can access the values using listbinding and can then store them as a string by using a delimiter.

  • BI Content Variable on 0Calday for first day of the fiscal year and first day of the current month

    Hi Friends,
    In one of my BEx queries, I need to restrict a key figure for 0Calday based on the first day of the current fiscal year. And another key figure for the first day of the current month. Instead of using Customer exit, I hope there is some SAP delivered standard variable for these filters.
    Please let me know if there is anything available for this. Your answers will be highly appreciated.
    Thanks & Regards,
    Ranjan

    Hi Ranjan,
    Please find below standard variables.
    Pls check below link for more.
    Standard Variables in BEX related to Time Charcteristics
    Characteristic
    Variable
    Description
    0CALDAY
    0CWD
    Current Workday (SAP Exit)
    0CALDAY
    0CYTCD
    Cumulated to Current Day (SAP Exit)
    0CALDAY
    0DAT
    Current Calendar Day (SAP Exit)
    0CALDAY
    0DAY_***
    Cumulation of all Values to Key Date (SAP-Exit)
    0CALDAY
    0LYTCLD
    Cumulated to Current Day of Previous Year
    0CALDAY
    0LYTCLD
    Previous Year Cumulated to Current Day (SAP Exit)
    0CALDAY
    0L_DATE
    Last Calendar Date
    0CALDAY
    0P_LY_R
    Comparative Period for Last Year
    0CALDAY
    0P_TY_R
    Period for Current Year up to Yesterday
    0CALDAY
    0S_KDATE
    Key Date Interval for Previous Year (SAP Exit)
    0CALDAY
    0S_KDAY
    Key Date Interval Current Year (SAP Exit)
    Best,
    SATYA.

  • If I want to retrieve more information about the cookies being stored, such as when the cookie was accessed/created/modified; how can I find this information?

    I would like to have more information about the cookies being stored on my computer via firefox- such as last date accessed/created/modified; how can I add these options to cookie storage?

    Maybe this extension will do that:
    *Cookies Manager+: https://addons.mozilla.org/firefox/addon/cookies-manager-plus/

  • I have a problem with cookies not being enabled. I followed the guide "Enabling and deleting cookies", but it did not save new settings to my computer. What should I do?

    I am trying to login to Facebook. I keep getting error message
    Cookies Required
    Cookies are not enabled on your browser. Please adjust this in your security preferences before continuing.
    I followed the Firefox direction for privacy settings but they are not being saved. What am I doing wrong?

    If you are blocking cookies, make an exception; If you are not blocking cookies, make sure you don't block site with an exception. Compare your settings to
    * http://imageshack.us/photo/my-images/232/clearcachew.png/
    Some references:
    * Cookies - MozillaZine Knowledge Base<br>http://kb.mozillazine.org/Cookies
    * Cookies | How to | Firefox Help<br>https://support.mozilla.com/kb/Cookies
    * Enabling and disabling cookies | How to | Firefox Help <br>https://support.mozilla.com/kb/Enabling%20and%20disabling%20cookies
    * Problematic extensions - MozillaZine Knowledge Base (see '''NoScript''' extension) <br>http://kb.mozillazine.org/Problematic_extensions

  • It seems like each time I get a Firefox update (the latest being 5.0), it disables the virus protection software. I'm currently using McAfee SiteAdvisor and Rapport, which program would you suggest using with Firefox for virus protection?

    I'm using a Mac OSX platform for my computer system. Is there any reason why McAfee SiteAdvisor and Rapport virus protection software programs are not compatible with Firefox updates? What virus protection software is Mozilla suggesting to use with Firefox?

    Download the latest version of Trusteer Rapport from here: <br />
    http://www.trusteer.com/book/rapport-installation-links
    The McAfee Site Advisor is blocklisted in Firefox 5 due it being the #2 cause of crashes. McAfee is developing a new add-on, which is due to be ready in late July. See the McAfee forum for more information. <br />
    https://community.mcafee.com/message/195191#195191
    Try this add-on to replace the Site Advisor: <br />
    https://addons.mozilla.org/en-US/firefox/addon/wot-safe-browsing-tool/

Maybe you are looking for

  • Control checkbox form field in word with report generation toolkit for Microsoft office

    Hi all, Happy New Year! I insert in the word template the check box form field. It has a bookmark name "Check1". Now I'm trying to checked or unchecked this field using the report generation toolkit for Microsoft office and I couldn't. If anyone now

  • Excel 2010 file opens in Microsfot Office Workbook 97 only on one machine

    We have a shared Excel 2010 file that 4 people use. For the 3 users it opens in Excel 2010 but for the 4th user it opens in Microsoft Office Workbook 97. Why does it not open in Excel 2010 like it does for the rest? How do I get it to open correctly

  • Shoul I buy a 720 or 1080 LCD for my APPLE TV?

    I want to be able to run high res images from my iPhoto library slideshow to the LCD via the Apple TV. I see great prices at COSTCO on LCD's but their employees are not mac savvy. Can someone kindly advise if a 1080 HD LCD is overkill vs. a 720 HD LC

  • File 'MOVE' Operation In ADF App.

    Hi All, We have a requirement where using ADF App, we need to move a file from one location to another. I tried using inputFile component and observed that using this I can copy file but cant delete the original file from source directory. Do we have

  • MotorWay dll

    I have a problem with MotorWay for the Motor-Bee with LabView 8.2. I used Tools»Import»Shared Library (.dll) with mt.h and mtb.dll and created a library with 3 Vi's. Unfortunately if I start a Vi, I get a message that LabView must be closed. Solved!