SSRS LYTD Calculations

I have the following matrix report layout:
                            |    YEAR
                            |   Program
 SalesRep | Month | Sum(Last Year Stuff) | Sum(This Year Stuff)
How do I calculate YTD for 2013, 2014?
I tried this expression below, it worked on  month level (showing Jan) but YTD Total showed 12 month total.
= round(Sum(iif(Fields!month_date.Value>DatePart(DateInterval.Month,Parameters!date.Value),0, (Fields!Prev12MonthStuff.Value))))
I tried to put sum(ReportItems!TextboxStuff.Value) into YTD (group total) row, but got an error:
“Aggregate function can be used only on report itemscontained in page headers and footers”

Hi BrBa,
Per my understanding that you want to calculate the YTD value of each year based on the Calendar date parameter, right?
I have some doubt about what the expect value of YTD you mean, for example, you have mentioned that if Parameters!date.Value='1/27/15' , you will expect to see LYTD sales up to 1/31 for 2013,2014,2015 ,If that means get the value of the Month Jan
of each year like below, right?
              2013                          2014         
        2015   
YTD  17,813   24,184         24,184   14,814      31,486   51,616
If you select "2/01/2015", it will calculate the YTD for each year of (Jan + Feb) ?
I have tested on my local environment that using the expression as you have provided can get the aggregate value of the months based on the data in the parameter as below:
= round(Sum(iif(Fields!month_date.Value>DatePart(DateInterval.Month,Parameters!date.Value),0, (Fields!Prev12MonthStuff.Value))))
You can see the expression works fine as you expected.
Please provide the sample data of all the field of the table in the DB and also more details information about the YTD values you want to get if I have some misunderstanding.
Any problem, please feel free to ask.
Regards
Vicky Liu
Vicky Liu
TechNet Community Support

Similar Messages

  • SSRS with calculated dimension members SSAS

    Hello everybody,
    I have an interesting scenario involving a SSRS report with a matrix connected to a SSAS cube containing calculated dimension members.
    One of the parameters is "Reference Week".  Based on that parameter, I need the measures for the previous 5 weeks.
    So I created an anchor dimension "Analysis Weeks" with the members "Week -1" to "Week -5".
    Everything is working fine.  The only problem is the names of the columns on the report.  
    Currently I have "Current Week", "Week -1", etc. as column names, I'd like to show the real dates.
    For example, if I choose "2014-02-15" as the reference week, I want the first column to show "2014-02-15" instead of "Current Week". The second would show "2014-02-08" instead of "Week -1", etc.
    I tried to get the current column position in the matrix, which I could use the with @ReferenceWeek parameter, but I can't access that property.
    Any suggestion?
    Thanks

    If I understand correctly, your column group is on "Analysis Weeks", is that right? If so just get the value of that field and use it to get the dates.
    =DateAdd("d",-1*CInt(Right(Fields!AnalysisWeeks.Value,1))*7,Fields!ReferenceWeek.Value)
    "You will find a fortune, though it will not be the one you seek." -
    Blind Seer, O Brother Where Art Thou
    Please Mark posts as answers or helpful so that others may find the fortune they seek.

  • Report Server 2008 R2 incorrect Data in Report (Matrix)

    Hi,
    i try to build a report based on a stored procedure.
    Query returns data like:
    The Matrix should show data per EmplID and FOSGRP (Rows) and per BaseType Column.
    But the matrix shows data like this (eLearning and ILT are different Basetypes). Rows and Columns are correct but not the values, the are completly wrong, as you can see in the image above.
    Matrix shows data like this:
    The correct Totals should be eLearning = 11.01, ILT = 12. Where are the wrong Values come from?
    Total on FOSGRP.
    The matrix contains 2 rowgrouping 1. per Emplid, 2. per FOSGRP and 1 Column Group per BaseType (contains elearning/ILT).
    I tried out as well with a table object and it shows as well wrong numbers.
    Whats going wrong here? Wy is SSRS doing calculations on the detail data?
    The RawData returned from the query works fine in Excel Pivot, its doing the correct Totals
    Thank you for any idea and help
    Ivo

    Hi IvoSutter,
    According to your description, you have a store procedure to retrieve data from database. Now you find the data displayed in matrix was different from the records returned from query. Right?
    In this scenario, your report design was correct. In Reporting Services, if it only returns 4 rows in Query Builder, it supposed to show the same records in the report. Based on your second picture, it seems has other records for
    the EmployeeID so that the TotalCredit is not correct. Please try to execute the query in both Query Builder and SQL Server Management Studio. Check if they return same records. As we tested in our local environment, it works properly. Here are screenshots:
    If you can't get the same records in those two environment, please restart the Report Server in Reporting Services Configuration Manager.
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Calculating Percent totals and Averages in SSRS

    Below is a report created using SSRS. I want to be able to calculate the percentage(%) total to add up to 100 % in the Total column. For some reason my averages are not working as you can see from the table. The idea is to calculate the averages of opportunities
    as well as Sold. But from my calculation, things are not adding up as I supposed. This report is not grouped by parent. How do I make this to work as it should? Thank you.
    (NB: Please zoom in to view the image)
    Zionlite

    Hi,
    According  to the description, I doubt you may manually add Total and Averages columns. Did you manually add Local and International or they were in a column group?
    You can use the following expression for the Opportunity Cost(averages) column in the total row:
    =Sum(Fields!opportunitycost.Value)/2
    How did you calculate the percentage column? If it is Sold value divided by Opportunity Cost value, use:
    =Sum(Fields!sold.Value)/Sum(Fields!opportunitycost.Value)
    Also try to define the scope in the expression and see if it make difference.
    If there is no progress, please capture the screenshot of your design tab.(Click on the report and capture the image of your report structure)
    Also, tell us the expression of the text box which in problem.
    Thanks.
    Tracy Cai
    TechNet Community Support

  • Calculations for a Sales SSRS Report

    Hi it is my first time doing calculations for SSRS report 2012/ pls. help 
    I need to analyze the direction of the sales (with a graph over a period of time in days ). The X axis is DAYS and Y axis is Sales AMOUNT.
    The graph should show  parameters: ( cut by time, agent,   customers , sales area, supplier.)   
    It is be done in DWH . can you advise how and where

    Hi eh70,
    According to your description, you want to create a chart for displaying the sales of a period. And you need to do calculation for different slices of your data based on time, agent, customers etc. Right?
    In this scenario, if you want to you do calculation for different slices, you need to group the data based on corresponding data field first. However, in a chart, we can't specify a dynamic data field based on the parameter selection to group on for
    series. We can only make the records group on a data field/calculated field. So for your requirement, it can't be achieved in Reporting Services. If your data source is a cube, you can have a try in Analysis Services.
    Reference:
    Charts (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • SSRS 2008 Column Chart with Calculated Series (moving average) "formula error - there are not enough data points for the period" error

    I have a simple column chart grouping on 1 value on the category axis.  For simplicity's sake, we are plotting $ amounts grouping by Month on the category axis.  I right click on the data series and choose "Add calculated series...".  I choose moving average.  I want to move the average over at least 2 periods.
    When I run the report, I get the error "Formula error - there are not enough data points for the period".  The way the report is, I never have a guaranteed number of categories (there could be one or there could be 5).  When there is 2 or more, the chart renders fine, however, when there is only 1 value, instead of suppressing the moving average line, I get that error and the chart shows nothing.
    I don't think this is entirely acceptable for our end users.  At a minimum, I would think the moving average line would be suppressed instead of hiding the entire chart.  Does anyone know of any workarounds or do I have to enter another ms. connect bug/design consideration.
    Thank you,
    Dan

    I was having the same error while trying to plot a moving average across 7 days. The work around I found was rather simple.
    If you right click your report in the solution explorer and select "View Code" it will give you the underlying XML of the report. Find the entry for the value of your calculated series and enter a formula to dynamically create your periods.
    <ChartFormulaParameter Name="Period">
                      <Value>=IIf(Count(Fields!Calls.Value) >= 7 ,7, (Count(Fields!Calls.Value)))</Value>
    </ChartFormulaParameter>
    What I'm doing here is getting the row count of records returned in the chart. If the returned rows are greater than or equal to 7 (The amount of days I want the average) it will set the points to 7. If not, it will set the number to the amount of returned rows. So far this has worked great. I'm probably going to add more code to handle no records returned although in my case that shouldn't happen but, you never know.
    A side note:
    If you open the calculated series properties in the designer, you will notice the number of periods is set to "0". If you change this it will overwrite your custom formula in the XML.

  • SSRS Matrix Issue. Expression calculating in row with no data.

    I have a matrix with multiple column groups for different sales channels. With in each group there are several columns and some with expressions for calculations. The rows are based on sales reps. Now not every sales rep sells in every channel, so there
    are some columns in which a rep will have no data. I want them be blank or show a 0. I can do both of those. The issue I am having is in the expressions for reps that have no data, it is still showing a calculation. It seems to populate that cell with whatever
    the first result of an actual calculation is. See below. For rep D and E they have no calls or sales in this particular sales channel; however, the closing ratio is showing 30.23% (which is the closing ratio for rep A). I need this to be blank or 0 or N/A,
    anything other that a wrong %. I have tried numerous iif and isnothing statements, e.g. =iif(Fields!count_of_customers.Value = 0,0,Fields!count_of_customers.Value/iif(Fields!Calls.Value = 0,1,Fields!Calls.Value)) plus other i have found on the internet
    but none of them work. Can someone please help? Sorry it is not a picture of the report. They need to confirm my account before I can attach pictures. But this is the set up of the report.
    Figure A
    Phone Field
    Rep Calls
    Sales Closing Ratio
    Premium Rep
    Calls Sales
    A 1000
    323 32.3%
    $100,250 A
    50 5
    B 200
    10 5% $50,000
    B 0
    0
    C 300
    15 5% $25,000
    C 25
    5
    D 0
    0 32.3%
    $0 D
    300 50
    E 0
    0 32.3%
    $0 E
    100 15
    F 500
    100 20%
    $300,000 F
    0 0

    Hi RobTencents,
    After testing the issue in my environment, I can reproduce it. To fix this issue, please try to use the expression below to instead the original one:
    =iif(sum(Fields!count_of_customers.Value) = 0,0,sum(Fields!count_of_customers.Value)/iif(sum(Fields!Calls.Value) = 0,1,sum(Fields!Calls.Value)))
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • SSRS Using WHERE in a calculated field

    Hi All,
    Im having a real issue with something that seems like it should be easier than it is.
    In my tablix I want to add the expression =Sum(Fields!ID20.Value)-Sum(Fields!ID20.Value) BUT I need to determine if another criteria is met.
    EG - I want =Sum(Fields!ID20.Value WHERE [InOut]="In")-Sum(Fields!ID20.Value WHERE [InOut]="Out")
    Many Thanks for any help

    Hi LB79,
    In Reporting Services, Aggregate functions cannot be used in calculated field expressions, since the data for calculated fields will be based on individual rows not on group basis. As a workaround, we can directly add the expression to a textbox of the tablix
    instead of using that calculated field. For detail information, please refer to the following steps:
    Right click the text box which you want to insert the calculated field, then click Expression.
    In the Expression text box, refer to the following expression:
    =sum(iif(Fields!InOut.Value ="In", Fields!ID20.Value,0),"DataSet_name")-sum(iif(Fields!InOut.Value ="Out", Fields!ID20.Value,0),"DataSet_name")
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • SSRS 2012 how to use sum from one dataset in calculations in another dataset

     Hi
    I have 2 datasets and I would like to calculate a sum from dataset1 and then use it in calculations in dataset2. I was thinking of a lookup but I can not use an aggregate in the lookup.
    My data looks like this
    dataset1 (warehouse)
    Site   InventoryID            Qty_On_Hand
     A              1                               5
     B              1                               1
     C              1                               7
    Dataset2 (shipping location)
    Site        InventoryID               QTY_Ord                Date_required
     A                1                                 3                        
       2-1-2015
     A                1                                 4                        
       2-9-2015
     C                1                                 6                        
       2-9-2015
    I have set up parameters to that I can choose which sites to include in the report. It is rare that all sites will be included. Normally I will set the parameters to just look at sites A and B from both datasets
    In the case when my parameters are for Sites A and B I would like to come up with a report like
       Inventory_ID         2-1-2015         2-9-2015              Total Qty_Ord             Total Qty_On_Hand
               1                         3                       4              
                      7                                           6
    I will then compare a running total of each Inventory_ID to the total Qty_On_Hand and highlight the cell where Qty_ord exceeds Qty_on_hand
    I just can seem to figure out how to get the Total Qty_on_hand from dataset1 and use it in Dataset2
    Does anyone have a suggestion or two?
    Thank you !

    You can do it simply in your query:
    DECLARE @dataSet1 TABLE (site CHAR(1), inventoryID INT, qtyOnHand INT)
    INSERT INTO @dataSet1 (site, inventoryID, qtyOnHand)
    VALUES ('A',1,5),('B',1,1),('C',1,7)
    DECLARE @dataSet2 TABLE (site CHAR(1), inventoryID INT, qtyOrdered INT, dateRequired DATE)
    INSERT INTO @dataSet2 (site, inventoryID, qtyOrdered, dateRequired)
    VALUES ('A',1,3,'2015-2-1'),('A',1,4,'2015-2-9'),('C',1,6,'2015-2-9')
    SELECT d2.site, d2.inventoryID, d2.qtyOrdered, d2.dateRequired, SUM(d1.qtyOnHand) as qtyOnHand
    FROM @dataSet2 d2
    LEFT OUTER JOIN @dataSet1 d1
    ON d2.inventoryID = d1.inventoryID
    AND d2.site = d1.site
    GROUP BY d2.site, d2.inventoryID, d2.qtyOrdered, d2.dateRequired

  • Calculated fields in ssrs

    Hi friends,
    hope everyone had a good weekend.
    I have one requirement to call the value from different datasets within the same report.But the value should be returned based on multiple column join values.
    Ex: Main dataset query
      SELECT *  FROM   table a 
     WHERE  a.ChargeDate>=@TransactionDateFrom AND a.ChargeDate<=@TransactionDateTo AND a.DebtorID= @DebtorID
    dataset 2:
    SELECT * FROM  table b 
     WHERE  b.ChargeDate>=@GLStartYearDate AND b.ChargeDate<=@TransactionDateTo AND b.DebtorID= @DebtorID
    here i have tried to create a calculated field by joining multiple columns to use the lookup to display the value from dataset 2
    My approach: 
    calculated field in main dataset as Join1
    =Parameters!TransactionDateFrom.Value + "||" + Parameters!TransactionDateTo.Value + "||" + Parameters!DebtorID.Value
    calculated field in main dataset 2 as JoinArrears
    =Parameters!GLStartYearDate.Value + "||" + Parameters!TransactionDateTo.Value + "||" + Parameters!DebtorID.Value
    to display:
    =LookupSet(Fields!Join1.Value, Fields!JoinArrears.Value, AllocatedAmount.Value, "dataset2")
    but it is giving error..Please suggest me any solution for this.
    Thanks,
    sam.

    Hi Sam,
    I have copied the RDL code , please copy and save as .RDL file. Using Lookup I did this.
    In my implementaion if is not matching with your requirement, kindly let me know.
    <?xml version="1.0" encoding="utf-8"?>
    <Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
    <Body>
    <ReportItems>
    <Tablix Name="table1">
    <TablixBody>
    <TablixColumns>
    <TablixColumn>
    <Width>1in</Width>
    </TablixColumn>
    <TablixColumn>
    <Width>1in</Width>
    </TablixColumn>
    <TablixColumn>
    <Width>1in</Width>
    </TablixColumn>
    </TablixColumns>
    <TablixRows>
    <TablixRow>
    <Height>0.22in</Height>
    <TablixCells>
    <TablixCell>
    <CellContents>
    <Textbox Name="textbox2">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>ID</Value>
    <Style>
    <FontFamily>Tahoma</FontFamily>
    <FontSize>11pt</FontSize>
    <FontWeight>Bold</FontWeight>
    <Color>White</Color>
    </Style>
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>textbox2</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <BackgroundColor>SteelBlue</BackgroundColor>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCell>
    <TablixCell>
    <CellContents>
    <Textbox Name="Textbox3">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>fruit</Value>
    <Style>
    <FontFamily>Tahoma</FontFamily>
    <FontSize>11pt</FontSize>
    <FontWeight>Bold</FontWeight>
    <Color>White</Color>
    </Style>
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>Textbox3</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <BackgroundColor>SteelBlue</BackgroundColor>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCell>
    <TablixCell>
    <CellContents>
    <Textbox Name="Textbox5">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>Fruit Name</Value>
    <Style>
    <FontFamily>Tahoma</FontFamily>
    <FontSize>11pt</FontSize>
    <FontWeight>Bold</FontWeight>
    <Color>White</Color>
    </Style>
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>Textbox5</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <BackgroundColor>SteelBlue</BackgroundColor>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCell>
    </TablixCells>
    </TablixRow>
    <TablixRow>
    <Height>0.21in</Height>
    <TablixCells>
    <TablixCell>
    <CellContents>
    <Textbox Name="id">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=Fields!id.Value</Value>
    <Style>
    <FontFamily>Tahoma</FontFamily>
    </Style>
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>id</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCell>
    <TablixCell>
    <CellContents>
    <Textbox Name="fruit11">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=Fields!fruit1.Value</Value>
    <Style>
    <FontFamily>Tahoma</FontFamily>
    </Style>
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>fruit11</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCell>
    <TablixCell>
    <CellContents>
    <Textbox Name="FruitName11">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=Fields!FruitName1.Value</Value>
    <Style>
    <FontFamily>Tahoma</FontFamily>
    </Style>
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>FruitName11</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCell>
    </TablixCells>
    </TablixRow>
    </TablixRows>
    </TablixBody>
    <TablixColumnHierarchy>
    <TablixMembers>
    <TablixMember />
    <TablixMember />
    <TablixMember />
    </TablixMembers>
    </TablixColumnHierarchy>
    <TablixRowHierarchy>
    <TablixMembers>
    <TablixMember>
    <KeepWithGroup>After</KeepWithGroup>
    <RepeatOnNewPage>true</RepeatOnNewPage>
    <KeepTogether>true</KeepTogether>
    </TablixMember>
    <TablixMember>
    <Group Name="table1_Details_Group">
    <DataElementName>Detail</DataElementName>
    </Group>
    <TablixMembers>
    <TablixMember />
    </TablixMembers>
    <DataElementName>Detail_Collection</DataElementName>
    <DataElementOutput>Output</DataElementOutput>
    <KeepTogether>true</KeepTogether>
    </TablixMember>
    </TablixMembers>
    </TablixRowHierarchy>
    <DataSetName>DataSet1</DataSetName>
    <Top>0.36in</Top>
    <Height>0.43in</Height>
    <Width>3in</Width>
    <Style />
    </Tablix>
    <Textbox Name="textbox1">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>LookupSet</Value>
    <Style>
    <FontFamily>Tahoma</FontFamily>
    <FontSize>20pt</FontSize>
    <FontWeight>Bold</FontWeight>
    <Color>SteelBlue</Color>
    </Style>
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>textbox1</rd:DefaultName>
    <Height>0.36in</Height>
    <Width>5in</Width>
    <ZIndex>1</ZIndex>
    <Style>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    <Tablix Name="table2">
    <TablixBody>
    <TablixColumns>
    <TablixColumn>
    <Width>1in</Width>
    </TablixColumn>
    <TablixColumn>
    <Width>1in</Width>
    </TablixColumn>
    <TablixColumn>
    <Width>1in</Width>
    </TablixColumn>
    </TablixColumns>
    <TablixRows>
    <TablixRow>
    <Height>0.22in</Height>
    <TablixCells>
    <TablixCell>
    <CellContents>
    <Textbox Name="textbox3">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>ID</Value>
    <Style>
    <FontFamily>Tahoma</FontFamily>
    <FontSize>11pt</FontSize>
    <FontWeight>Bold</FontWeight>
    <Color>White</Color>
    </Style>
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>textbox2</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <BackgroundColor>SteelBlue</BackgroundColor>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCell>
    <TablixCell>
    <CellContents>
    <Textbox Name="Textbox4">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>fruit</Value>
    <Style>
    <FontFamily>Tahoma</FontFamily>
    <FontSize>11pt</FontSize>
    <FontWeight>Bold</FontWeight>
    <Color>White</Color>
    </Style>
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>Textbox3</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <BackgroundColor>SteelBlue</BackgroundColor>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCell>
    <TablixCell>
    <CellContents>
    <Textbox Name="Textbox6">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>Fruit Name</Value>
    <Style>
    <FontFamily>Tahoma</FontFamily>
    <FontSize>11pt</FontSize>
    <FontWeight>Bold</FontWeight>
    <Color>White</Color>
    </Style>
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>Textbox5</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <BackgroundColor>SteelBlue</BackgroundColor>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCell>
    </TablixCells>
    </TablixRow>
    <TablixRow>
    <Height>0.21in</Height>
    <TablixCells>
    <TablixCell>
    <CellContents>
    <Textbox Name="id2">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=Fields!id.Value</Value>
    <Style>
    <FontFamily>Tahoma</FontFamily>
    </Style>
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>id</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCell>
    <TablixCell>
    <CellContents>
    <Textbox Name="fruit2">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=Fields!fruit.Value</Value>
    <Style>
    <FontFamily>Tahoma</FontFamily>
    </Style>
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>fruit</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCell>
    <TablixCell>
    <CellContents>
    <Textbox Name="FruitName2">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=Fields!Join.Value</Value>
    <Style>
    <FontFamily>Tahoma</FontFamily>
    </Style>
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>FruitName</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCell>
    </TablixCells>
    </TablixRow>
    </TablixRows>
    </TablixBody>
    <TablixColumnHierarchy>
    <TablixMembers>
    <TablixMember />
    <TablixMember />
    <TablixMember />
    </TablixMembers>
    </TablixColumnHierarchy>
    <TablixRowHierarchy>
    <TablixMembers>
    <TablixMember>
    <KeepWithGroup>After</KeepWithGroup>
    <RepeatOnNewPage>true</RepeatOnNewPage>
    <KeepTogether>true</KeepTogether>
    </TablixMember>
    <TablixMember>
    <Group Name="table1_Details_Group2">
    <DataElementName>Detail</DataElementName>
    </Group>
    <TablixMembers>
    <TablixMember />
    </TablixMembers>
    <DataElementName>Detail_Collection</DataElementName>
    <DataElementOutput>Output</DataElementOutput>
    <KeepTogether>true</KeepTogether>
    </TablixMember>
    </TablixMembers>
    </TablixRowHierarchy>
    <DataSetName>DataSet2</DataSetName>
    <Top>1.11229in</Top>
    <Height>0.43in</Height>
    <Width>3in</Width>
    <ZIndex>2</ZIndex>
    <Style />
    </Tablix>
    <Tablix Name="Tablix2">
    <TablixBody>
    <TablixColumns>
    <TablixColumn>
    <Width>1in</Width>
    </TablixColumn>
    </TablixColumns>
    <TablixRows>
    <TablixRow>
    <Height>0.25in</Height>
    <TablixCells>
    <TablixCell>
    <CellContents>
    <Textbox Name="Textbox19">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>Amount</Value>
    <Style />
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>Textbox19</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCell>
    </TablixCells>
    </TablixRow>
    <TablixRow>
    <Height>0.25in</Height>
    <TablixCells>
    <TablixCell>
    <CellContents>
    <Textbox Name="Textbox20">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=Lookup(Fields!FruitName1.Value,Fields!Join.Value,Fields!amount.Value, "DataSet2")</Value>
    <Style />
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>Textbox20</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCell>
    </TablixCells>
    </TablixRow>
    </TablixRows>
    </TablixBody>
    <TablixColumnHierarchy>
    <TablixMembers>
    <TablixMember />
    </TablixMembers>
    </TablixColumnHierarchy>
    <TablixRowHierarchy>
    <TablixMembers>
    <TablixMember>
    <KeepWithGroup>After</KeepWithGroup>
    </TablixMember>
    <TablixMember>
    <Group Name="Details" />
    </TablixMember>
    </TablixMembers>
    </TablixRowHierarchy>
    <DataSetName>DataSet1</DataSetName>
    <Top>1.93625in</Top>
    <Left>0.16542in</Left>
    <Height>0.5in</Height>
    <Width>1in</Width>
    <ZIndex>3</ZIndex>
    <Style>
    <Border>
    <Style>None</Style>
    </Border>
    </Style>
    </Tablix>
    </ReportItems>
    <Height>3.05042in</Height>
    <Style />
    </Body>
    <Width>5.16542in</Width>
    <Page>
    <LeftMargin>1in</LeftMargin>
    <RightMargin>1in</RightMargin>
    <TopMargin>1in</TopMargin>
    <BottomMargin>1in</BottomMargin>
    <Style />
    </Page>
    <AutoRefresh>0</AutoRefresh>
    <DataSources>
    <DataSource Name="AdventureWorks2008R2">
    <DataSourceReference>AdventureWorks2008R2</DataSourceReference>
    <rd:SecurityType>None</rd:SecurityType>
    <rd:DataSourceID>830bec66-3eef-4c84-b26b-69b2843906ca</rd:DataSourceID>
    </DataSource>
    </DataSources>
    <DataSets>
    <DataSet Name="DataSet1">
    <Query>
    <DataSourceName>AdventureWorks2008R2</DataSourceName>
    <QueryParameters>
    <QueryParameter Name="@Fruit">
    <Value>=Parameters!Fruit.Value</Value>
    </QueryParameter>
    </QueryParameters>
    <CommandText>select * from
    Select 1 id , 'Apple' fruit
    union
    Select 2 id , 'Mango' fruit
    union
    Select 3 id , 'Grapes' fruit
    ) t
    where id =@Fruit</CommandText>
    <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
    </Query>
    <Fields>
    <Field Name="id">
    <DataField>id</DataField>
    <rd:TypeName>System.Int32</rd:TypeName>
    </Field>
    <Field Name="fruit1">
    <DataField>fruit</DataField>
    <rd:TypeName>System.String</rd:TypeName>
    </Field>
    <Field Name="FruitName1">
    <Value>=Parameters!Fruit.Value +"||"+Parameters!FruitName.Value +"||" +Parameters!abc.Value</Value>
    </Field>
    </Fields>
    </DataSet>
    <DataSet Name="DataSet2">
    <Query>
    <DataSourceName>AdventureWorks2008R2</DataSourceName>
    <QueryParameters>
    <QueryParameter Name="@Fruit">
    <Value>=Parameters!Fruit.Value</Value>
    </QueryParameter>
    </QueryParameters>
    <CommandText>select * from
    Select 1 id , 'Apple' fruit ,1000 amount
    ) t
    where id =@Fruit</CommandText>
    </Query>
    <Fields>
    <Field Name="id">
    <DataField>id</DataField>
    <rd:TypeName>System.Int32</rd:TypeName>
    </Field>
    <Field Name="fruit">
    <DataField>fruit</DataField>
    <rd:TypeName>System.String</rd:TypeName>
    </Field>
    <Field Name="amount">
    <DataField>amount</DataField>
    <rd:TypeName>System.Int32</rd:TypeName>
    </Field>
    <Field Name="Join">
    <Value>=Parameters!Fruit.Value +"||"+Parameters!FruitName.Value+"||" +Parameters!abc.Value</Value>
    </Field>
    </Fields>
    </DataSet>
    </DataSets>
    <ReportParameters>
    <ReportParameter Name="Fruit">
    <DataType>String</DataType>
    <DefaultValue>
    <Values>
    <Value>1</Value>
    </Values>
    </DefaultValue>
    <Prompt>Fruit</Prompt>
    </ReportParameter>
    <ReportParameter Name="FruitName">
    <DataType>DateTime</DataType>
    <DefaultValue>
    <Values>
    <Value>=now()</Value>
    </Values>
    </DefaultValue>
    <Prompt>FruitName</Prompt>
    </ReportParameter>
    <ReportParameter Name="abc">
    <DataType>DateTime</DataType>
    <DefaultValue>
    <Values>
    <Value>=now()</Value>
    </Values>
    </DefaultValue>
    <Prompt>abc</Prompt>
    </ReportParameter>
    </ReportParameters>
    <Language>en-US</Language>
    <ConsumeContainerWhitespace>true</ConsumeContainerWhitespace>
    <rd:ReportUnitType>Inch</rd:ReportUnitType>
    <rd:ReportID>c87d19dd-1be9-4dc4-9237-63d06aa7a91a</rd:ReportID>
    </Report>

  • SSAS SSRS Report Action on Cell Value w/ Embedded Single Quote Not Executing

    I have configured an SSAS 2008 R2 cube SSRS ReportAction. I'm having problems when the member value for a cell has an embedded single quote, e.g. abc's. The action displays on the context menu appropriately, but when I click on the action, nothing happens.
    For member values that do not have the single quote, the action works as designed. I've added a calculated ember to escape the embedded single quote by adding another single quote, e.g. abc''s, with no luck. Is there a resolution or workaround for this?

    Hi Mdccuber,
    According to your description, you create a reporting action in you cube, and it works fine except the members that have embedded single quote, right? In your scenario, it seems that you pass this value to the report as the parameter.
    In SQL Server Analysis Services (SSAS), when pass values to a report, multi-select parameters have to be placed into IN statement and SQL Server Reporting Services (SSRS) will do single-quote wrapping for string values automatically. In this case, the original
    value that have embedded single quote will be damaged. So this action not work. You can submit a feedback at
    http://connect.microsoft.com/SQLServer/Feedback and hope it is resolved in the next release of service pack or product.
    Regards,
    Charlie Liao
    TechNet Community Support

  • SSRS TechNet Gurus Announced for June 2014!

    The Results are in! and the winners of the TechNet Guru Competition June 2014 have been posted on the
    Wiki Ninjas Blog.
    Below is a summary, heavily trimmed to fit the size restrictions of forum posting.
     BizTalk Technical Guru - June 2014  
    Steef-Jan Wiggers
    BizTalk Server: Custom Archiving
    TGN: "This one was my favorite this month. Archiving is a topic that is brought up often. Well done explaining it simply and how to do it according to best practice"
    Sandro Pereira: "Love the topic, well explain and with everything you need, my favorite."
    Mandi Ohlinger: "Another great addition to the Wiki. "
    boatseller
    BizTalk: Reducing and Consolidating WCF Serialization Schema Types
    TGN: "Very good, keeping the code clean, and only referencing what you need and consolidate it is important!"
    Mandi Ohlinger: "Great solution to somewhat-annoying behavior. Nice addition to the Wiki!"
    Sandro Pereira: "Great article."
    Murugesan Mari Chettiar
    How to Implement Concurrent FIFO Solution in BizTalk Server
    Ed Price: "Incredibly thorough in your explanations! Great formatting. Good job!"
    TGN: "First in, first out. Great article Murugesan!"
    Sandro Pereira: "Good additional to the TechNet Wiki, good work."
     Forefront Identity Manager Technical Guru - June 2014  
    Remi Vandemir
    Custom Reports in FIM2010R2
    AM: "Great step-by-step guide for generating custom reports. Thanks for taking the time to put this together."
    PG: "Nice article, in an area that is less known!"
    Søren Granfeldt: "Very comprehensive."
    Ed Price: "Great job on the intro, and a lot of images really help clarify all the steps!"
    GO: "Thank you "
    Eihab Isaac
    FIM 2010 R2: Review pending export changes to Active Directory using XSLT
    Ed Price: "Great introduction, great steps, and great job on the image and code formatting!"
    GO: "An introduction, a sample code, images, a TOC and a conclusion. Nothing here to preserve the GOLD medal!"
    PG: "Nice article!"
    Søren Granfeldt: "Nice and precise"
    Scott Eastin
    A Practical Alternative to the PeopleSoft
    AM: "Thank you for sharing. Great (and probably superior) alternative for those using PeopleSoft as import-only data source."
    GO: "Amazing article, love it so much"
    PG: "Would like to see more elaborated details in this article."
    Søren Granfeldt: "A little more technical stuff would be nice"
    Ed Price: "Some good community collaboration in removing blog-like personalization. This is a great topic with some good holistic thinking!"
     Microsoft Azure Technical Guru - June 2014  
    Mr X
    Configuration of WATM (Windows Azure Traffic Manager) for Web Portals hosted
    on Azure VMs
    JH: "Two simple words: Love it! The detailed explanation on how Traffic Manager works is awesome."
    Ed Price: "Wow! Incredibly well written, with beautiful diagrams and a great use of images and tables! Great topic!"
    GO: "This is a great article! Thanks Mr.X"
    Mr X
    How to use Windows Azure as Traffic Manager for Web portals
    hosted in multiple on-premise datacenters
    JH: "Very detailed! Great explanation at the beginning followed by a good step-by-step guide."
    Ed Price: "A much needed article! Great job on the formatting and images!"
    GO: "Thanks again, MR.X"
    Mr X
    How to connect Orchestrator to Windows Azure
    GO: "I really enjoyed reading this article, clever and well written. Lovely done!"
    JH: "Great article! I especially love the amount of pictures provided in the article."
    Ed Price: "Good procedural article! Great use of images!"
     Microsoft Visio Technical Guru - June 2014  
    Mr X
    How to open Visio files without Visio
    AH: "This Article is pretty basic and lacks details. Visio Viewer doesn't just open in IE but also in Outlook and File explorer. The writer should include the link to http://blogs.office.com/2012/11/28/download-the-free-microsoft-visio-viewer/
    this blog which has lot more details "
    Ed Price: "Good. I think the SEO on the title will drive more awareness of the Visio Viewer."
    GO: "Thanks you Mr.X! Again a great article!"
     Miscellaneous Technical Guru - June 2014  
    Ed Price - MSFT
    Yammer: Announcements Feature
    TGN: "Wow, not only is this a good way on how to write annoncments on Yammer, but in generel. Really, really great write-up Ed! T"
    GO: "Tord says on the comment section: "Very nice article, Ed. I really enjoyed reading it and you had a great set of tips. Thanks for sharing!".. I only can respond AMEN! Thanks Ed!"
    Margriet Bruggeman: "Good discussion of announcements feature."
    Anthony Caragol
    Backing Up and Restoring Lync 2013 Contacts
    Margriet Bruggeman: "Short & Sweet"
    GO: "Great article, but I'm missing, examples, images, definitions etc for a huge section like "backup and restore""
    TGN: "Very good, Lync has eaten up the market and is a key product in most companies, articles like this is very valuable. Great work Anthony!"
     SharePoint 2010 / 2013 Technical Guru - June 2014  
    Geetanjali Arora
    SharePoint Online : Working with People Search and User Profiles
    Benoît Jester: "A very good article, a must-read for those interested by SharePoint Online and the use of search and user profile API."
    Jinchun Chen: "Excellent. Just a tip, if you would like to improve the performance, please use the Search Service to search user profiles"
    Craig Lussier: "Good walkthrough and code example for getting started with People Search!"
    Margriet Bruggeman: "Good starter for working with search and profiles"
    Jaydeep Mungalpara
    Creating Bookmarks in Wiki Pages - SharePoint Rich Text Editor Extension
    Margriet Bruggeman: "Really cool! In the past, I was actually looking for this and its a nice implementation of this functionality. This article gets my vote!"
    Craig Lussier: "Great solution for extending out of the box functionality. I like the synergy between the TechNet Wiki and TechNet Gallery!"
    GO: "Simple but powerfull. We should all take an example about how this article has been written. This article has a TOC, headings and even a code! Well done!"
    Jinchun Chen: "Nice. "
    Benoît Jester: "A simple button which can save a lot of time!"
    Dan Christian
    PowerShell to copy or update list items across SharePoint sites and farms
    GO: "The best artice for June! Thanks Dan, you deserve the GOLD medal!"
    Benoît Jester: "A good article with useful scripts, as they can be used fior many scenarios (data refresh, migration tests, ...)"
    Jinchun Chen: "Good and low-cost solution. To be automatic, we can use EventHandle instead. "
    Craig Lussier: "Nice PowerShell script solution and explanation of the scenario. Consider using functions with parameters for easier reuse so input parameters are not hard coded."
    Margriet Bruggeman: "This script can be useful, although typically migration scenarios are more complex than this. Having said that, I probably end up using this script some time in in the future"
     Small Basic Technical Guru - June 2014  
    litdev
    Small Basic: Sprite Arrays
    Ed Price: "An important topic that's well described with fantastic examples! Great article!"
    Michiel Van Hoorn: "Great starter for Sprite Fundamentals and how to handle them. Briljant start point for greating you 2D shooter"
    Jibba Jabba
    Small Basic - Monthly Challenge Statistics
    Ed Price: "Jibba Jabba brings us astonishing insights and data about LitDev's Small Basic Monthly Challenges!"
    RZ: "This is very nicely done and showed all the statistics visually"
    Nonki Takahashi
    Small Basic: Challenge of the Month
    RZ: "This is very nicely done and organized all challenges of the month in one place"
    Ed Price: "Although this is very basic, it's incredibly helpful to get all these in one list and to access all the great challenges!"
    Michiel Van Hoorn: "Good explainer on  fundamental structures."
     SQL BI and Power BI Technical Guru - June 2014  
    Anil Maharjan
    Using Power Query to tell your story form your Facebook Data
    Jinchun Chen: "Interesting. I liked this best"
    PT: "Plenty to like here" 
    Ed Price: "Great! I love to see Power Query articles like this! Great formatting and use of images!"
    Tim Pacl
    SSRS Expressions: Part 1 - Program Flow
    PT: "A very comprehensive article about program flow expressions. Nice job. I'm sure many will benefit from this article. Just a little feedback about some terminology that could be more clear: The entire statement that
    is typically used to set a property value for an object in an SSRS report is an "expression". Each of the three programming constructs you've mentioned (e.g. IIF, SWITCH & CHOOSE) are "functions" and not expressions or statements."
    Jinchun Chen: "Perfect! Good article for SSRS newbie." 
    Ed Price: "The table and images help bring it more value. Great job!"
    Anil Maharjan
    How to Schedule and Automate backups of all the SSAS catalogs within the
    Server Instance
    PT: "This is a very useful article about automating multiple Analysis Services database backups using an SSIS package and the SQL Server Agent. Nice job."
    Jinchun Chen: "Good." 
    Ed Price: "Good use of images. Could be improved with better code formatting. Good job!"
     SQL Server General and Database Engine Technical Guru - June 2014  
    Shanky
    SQL Server: What does Column Compressed Page Count Value Signify
    in DMV Sys.dm_db_index_physical_stats ?
    DB: "Interesting and detailed"
    DRC: "• This is a good article and provides details of each and every step and the output with explanation. Very well formed and great information. • We can modify the create table query with “DEFAULT VALUES". CREATE TABLE [dbo].[INDEXCOMPRESSION](
    [C1] [int] IDENTITY(1,1) NOT NULL, [C2] [char](50) NULL DEFAULT 'DEFAULT TEST DATA' ) ON [PRIMARY]"
    GO: "Very informative and well formed article as Said says.. Thanks for that great ressource. "
    Durval Ramos
    How to get row counts for all Tables
    GO: "As usual Durva has one of the best articles about SQL Server General and Database Engine articles! Thanks, buddy!" "
    Jinchun Chen: "Another great tip!"
    PT: "Nice tip" 
    Ed Price: "Good topic, formatting, and use of images. This would be far better if the examples didn't require the black bars in the images. So it would be better to scrub the data before taking the screenshots. Still a good article. Thank
    you!"
     System Center Technical Guru - June 2014  
    Prajwal Desai
    Deploying SCCM 2012 R2 Clients Using Group Policy
    Ed Price: "Great depth on this article! Valuable topic. Good use of images."
    Mr X
    How to introduce monitoring and automatic recovery of IIS application
    pools using Orchestrator
    MA: "Good job Mr X, However I would like to see this runbook integrated as a recovery task with Operations Manager IISapppools Monitors in order to maintain a standard way of notifications and availability reporting."
    Ed Price: "Good formatting on the images, and great scenario!"
    Prajwal Desai
    How to deploy lync 2010 using SCCM 2012 R2
    Ed Price: "Great job documenting the entire process!!!"
     Transact-SQL Technical Guru - June 2014  
    Saeid Hasani
    T-SQL: How to Generate Random Passwords
    JS: "I loved the article, well structured, to the point. Not missing any caveats that might occur, really good in the end. I would suggest changing the function to accept a whitelist / blacklist as well as a length of
    the password to be created. This would be the cherry on the pie :-)"
    Samuel Lester: "Very nice writeup for a real world problem!"
    Richard Mueller: "Clever and apparently well researched. I liked the detailed step by step explanations."
    Jinchun Chen: "Excellent!"
    Manoj Pandey: "A good and handy utility TSQL that I can use and levarage if I have to use similar feature in future."
    Hasham Niaz
    T-SQL : Average Interval Length
    Richard Mueller: "A good article, but I need more explanation of the concepts."
    Manoj Pandey: "A handy TSQL script that I can use and levarage if I have to use similar feature in future."
    Visakh16
    T-SQL: Retrieve Connectionstring Details from SSIS Package
    Manoj Pandey: "Good shortcut by using TSQL with XML to read metadata information from SSIS XML file."
    Samuel Lester: "Handy trick, thanks for posting!"
    Richard Mueller: "Good code, but more explanation needed. Could use a See Also section."
     Visual Basic Technical Guru - June 2014  
    The Thinker
    Better to Ask for forgiveness then permission
    Richard Mueller: "Good use of images and code. The humorous title might be better in a blog."
    MR: "Great topic!"
    GO: "Well, to be honnest, many people worked on that article, but still, the owner "the thinker" should receive the credits! muchos gracias "The Thinker" for the Most Revised Article"
     Visual C# Technical Guru - June 2014  
    Jaliya Udagedara
    Entity Framework Code First - Defining Foreign Keys using Data Annotations
    and Fluent API
    Ed Price: "Wow. Good descriptions, great code snippets, and great job highlighting sections on your images!"
    GO: "Thank you."
     Wiki and Portals Technical Guru - June 2014  
    XAML guy
    History and Technology Behind the TechNet Wiki Ninja Belt Calculator
    Ed Price: "It's amazing to see all the details of what this tool does. Great job on the descriptions and formatting the images and text!"
    Richard Mueller: "Great documentation. Good links to explain everything."
    GO: "I love your articles XAML guy! Always clear and always a pleasure to read! Thanks for you help and commitment for this tool."
    Durval Ramos
    HTML5 Portal
    Ed Price: "This is great to see this HTML5 resource!"
    Richard Mueller: "A great contribution to our collection of portals"
    GO: "The HTML5 Portal is A-W-E-S-O-M-E !"
    João Sousa
    ASP.NET Portal
    Ed Price: "Good job on this portal! The Return to top links are helpful!"
    Richard Mueller: "More should be done to distinguish this portal from
    here."
    GO: "Thanks Joao!"
     Windows Phone and Windows Store Apps Technical Guru - June 2014  
    Dave Smits
    Theming of your application
    Peter Laker: "Another great article from the mighty Dave. Very useful. Not sure if MS like us want us to work around the accents so much though ;)"
    Ed Price: "Very useful topic and great formatting on the code! Could benefit from more explanation on the code toward the bottom and a See Also section. Great article!"
    saramgsilva
    Creating Windows Phone and Window 8.1 applications using Microsoft App Studio
    Peter Laker: "A great introduction! Nice walkthrough, and plenty to look at!"  
    Ed Price: "This is good. I love the narrative and use of images! Good conclusion!"
    Carmelo La Monica
    Create Universal Application with Windows Phone App Studio (en-US).
    Peter Laker: "Sensational article. A real attention grabber and written very clearly."  
    Ed Price: "Fantastic job on the narrative and images. Some amazing articles this month!"
     Windows Presentation Foundation (WPF) Technical Guru - June 2014  
    Magnus (MM8)
    WPF: How To Tab Between Items In a ListBox
    KJ: "This article seemed very useful to me. The kind of thing that I might need and here's the answer."
    GO: "Thanks for that great article!."
    Ed Price: "Another amazing article from Magnus! Great job on the topic choice (very needed scenario), formatting, code, explanations, and See Also section. Fantastic article!"
    Sugumar Pannerselvam
    Lets forget about limitations and temprorary fix... Think about 4.5 features
    KJ: "Wish there were code samples and more flushed out scenarios"
    GO: "Why second place? the layout and way to explain didn't convince me. Doesn't mean that the article is bad. The article is awesome; but it's missing something."
    Ed Price: "Short and sweet. Could benefit from adding in some code snippet examples and images. Good topic choice."
     Windows Server Technical Guru - June 2014  
    Mr X
    DHCP on Windows Servers – Why are the expired IP addresses not getting re-assigned?
    JM: "This is an excellent article, thanks for your contribution."
    Richard Mueller: "Important information with good explanation. Needs a See Also section."
    Philippe Levesque: "Good article ! I like how it's explained versus Windows Server. An image with the DHCP's process could be a good addition for reference. (DHCP OFFER, DHCP ACK, etc..)"
    Mr X
    How to force a DHCP database cleanup for expired leases in a specific scope
    GO: "I'm actually thinking that nobody can defaut you Mr.X"
    Philippe Levesque: "Good article ! I would add that changing the lease time to be shorted could help too."
    JM: "A very good article, however you might consider adding this content as a section in your article about expired IP addresses in DHCP"
    Richard Mueller: "More good information. Should be linked to the other DHCP article."
    GL: "This is OK but a better solution for a highly utilized DHCP scope would be to shorten the lease time and/or configure a superscope."
    Hicham KADIRI
    Windows Server Core 2012 R2 - Initial configuration
    GL: "This is good required information. I would really like to see information added about how to add a server role. You might consider providing PowerShell alternatives to the netsh and other commands."  
    JM: "This is a great to-the-point article on how to configure a Core install of Windows Server, nice work."
    Richard Mueller: "A great collection of useful tools. Some could use images, more detail, or examples. The example sections could be added to the Table of Contents."
    GO: "Well, our new french MVP! Well written Hicham! Do not forget to pray attention for the layout! It's capital for readers and judges!"
    Philippe Levesque: "I like the article, a good resumé of the command you need to do to configure a server."
    Don't forget the full version, with runners up is available
    here.
    More about the TechNet Guru Awards:
    TechNet Guru Competitions
    How it works
    #PEJL
    Got any nice code? If you invest time in coding an elegant, novel or impressive answer on MSDN forums, why not copy it over to the one and only
    TechNet Wiki, for future generations to benefit from! You'll never get archived again!
    If you are a member of any user groups, please make sure you list them in the
    Microsoft User Groups Portal. Microsoft are trying to help promote your groups, and collating them here is the first step.

    I want to congratulate Anil and Tim on some fantastic contributions!
     SQL BI and Power BI Technical Guru - June 2014  
    Anil Maharjan
    Using Power Query to tell your story form your Facebook Data
    Jinchun Chen: "Interesting. I liked this best"
    PT: "Plenty to like here" 
    Ed Price: "Great! I love to see Power Query articles like this! Great formatting and use of images!"
    Tim Pacl
    SSRS Expressions: Part 1 - Program Flow
    PT: "A very comprehensive article about program flow expressions. Nice job. I'm sure many will benefit from this article. Just a little feedback about some terminology that could be more clear: The entire statement that is
    typically used to set a property value for an object in an SSRS report is an "expression". Each of the three programming constructs you've mentioned (e.g. IIF, SWITCH & CHOOSE) are "functions" and not expressions or statements."
    Jinchun Chen: "Perfect! Good article for SSRS newbie." 
    Ed Price: "The table and images help bring it more value. Great job!"
    Anil Maharjan
    How to Schedule and Automate backups of all the SSAS catalogs within the
    Server Instance
    PT: "This is a very useful article about automating multiple Analysis Services database backups using an SSIS package and the SQL Server Agent. Nice job."
    Jinchun Chen: "Good." 
    Ed Price: "Good use of images. Could be improved with better code formatting. Good job!"
    Ed Price, Azure & Power BI Customer Program Manager (Blog,
    Small Basic,
    Wiki Ninjas,
    Wiki)
    Answer an interesting question?
    Create a wiki article about it!

  • SSRS expression sum question

    I want to add a column after Total lets say..'Progress' where Progress = sum(Actual)/sum(Budget)
    The only filter on Progress is to consider only those values from months where both Actual and Budget are present.
    So, e.g.
    For first row: 0/0 = 0
    For second row: 0/0 = 0
    For third row: 28334/67060(instead of 200511) = 0
    if there would have been an Actual value for the month of August e.g. 100, then (28334+100)/(67060+66614)
    For fourth row: 0/0 = 0
    How can I achieve this using expressions in SSRS?
    Thanks in advanc

    Hi rockstar283,
    As per my understanding, you want to add a column names Progress, it is calculated from the values of Actual and Budget. In current month, Progress = sum(Actual)/sum(Budget), else, it is set to 0. If so, please refer to the following expression:
    =IIF(Month(Fields!pmonth.Value)=Month(Today()),Sum(Fields!Actual.Value),0)/IIF(Sum(Fields!budget.Value)=0,1,Sum(Fields!budget.Value))
    The following screenshot is for your reference:
    If my understanding is not correct, please feel free to let me know. I would appreciate it if you could give us detailed description of your requirements, it’s also better to provide the table structure and some sample data. It will help us move more quickly
    toward a solution.
    Thanks,
    Wendy Fu

  • Multiplying 2 values based on an If statement in SSRS reports

    I am working on a pretty complicated report, and I am unable to get the values to multiply correctly on one line.  The expression is simple, if the value in textbox293 is greater then the value in textbox294 then multiply textbox293 by textbox289 else
    multiply textbox294 by textbox289.  
    In SSRS terms IIF(textbox293.value > textbox294.value, textbox293.value * textbox289.value, textbox294.value * textbox289.value)
    I am using the actual formulas that I used to get the values, they have a nested IIF statement to return 0.00 if the value is less < 0.  I am also rounding to 6 decimal places on 1 value to ensure I get the correct value out to 4 decimal places.
    I have checked all of the value on the report up to this point are correct, and are displaying correctly.  I have broken apart my IIF statement to make it easier to read: 
    =IIF(IIF((Sum(Fields!RSR_MIN_2.Value, "Revenue") + IIF((Sum(Fields!SR_Minus_2.Value, "Certificated_Exp") - First(Fields!RSR_MIN_2.Value, "Rev_Code5899") - First(Fields!End_Fund_min2.Value, "End_Fund_Balance"))
    * (Sum(Fields!RGF_MIN_2.Value, "Revenue") / First(Fields!RGF_MIN_2.Value, "Rev_Code5899"))< 0, 0.00, (Sum(Fields!SR_Minus_2.Value, "Certificated_Exp") - First(Fields!RSR_MIN_2.Value, "Rev_Code5899") - First(Fields!End_Fund_min2.Value,
    "End_Fund_Balance")) * (round(Sum(Fields!RGF_MIN_2.Value, "Revenue") / First(Fields!RGF_MIN_2.Value, "Rev_Code5899"),6))))/(First(Fields!WADA2011_1.Value, "Second_Year_Preceeding_WADA")) < 0, 0.00, (Sum(Fields!RSR_MIN_2.Value,
    "Revenue") + IIF((Sum(Fields!SR_Minus_2.Value, "Certificated_Exp") - First(Fields!RSR_MIN_2.Value, "Rev_Code5899") - First(Fields!End_Fund_min2.Value, "End_Fund_Balance")) * (Sum(Fields!RGF_MIN_2.Value, "Revenue")
    / First(Fields!RGF_MIN_2.Value, "Rev_Code5899"))< 0, 0.00, (Sum(Fields!SR_Minus_2.Value, "Certificated_Exp") - First(Fields!RSR_MIN_2.Value, "Rev_Code5899") - First(Fields!End_Fund_min2.Value, "End_Fund_Balance"))
    * (round(Sum(Fields!RGF_MIN_2.Value, "Revenue") / First(Fields!RGF_MIN_2.Value, "Rev_Code5899"),6))))/(First(Fields!WADA2011_1.Value, "Second_Year_Preceeding_WADA"))) 
    >
     =IIF((Sum(Fields!RSR_MIN_1.Value, "Revenue") + IIF((Sum(Fields!SR_MINUS_1.Value, "Certificated_Exp")-first(Fields!RSR_MIN_1.Value,"Rev_Code5899")-first(Fields!End_FundMinus1.Value,"End_Fund_Balance"))*(Sum(Fields!RGF_MIN_1.Value,
    "Revenue")/first(Fields!RGF_MIN_1.value,"Rev_Code5899"))< 0, 0.00, (Sum(Fields!SR_MINUS_1.Value, "Certificated_Exp")-first(Fields!RSR_MIN_1.Value,"Rev_Code5899")-first(Fields!End_FundMinus1.Value,"End_Fund_Balance"))*(round(Sum(Fields!RGF_MIN_1.Value,
    "Revenue")/first(Fields!RGF_MIN_1.value,"Rev_Code5899"),6)))) / (First(Fields!WADA2012_1.Value, "Second_Year_Preceeding_WADA")) < 0, 0.00, (Sum(Fields!RSR_MIN_1.Value, "Revenue") + IIF((Sum(Fields!SR_MINUS_1.Value,
    "Certificated_Exp")-first(Fields!RSR_MIN_1.Value,"Rev_Code5899")-first(Fields!End_FundMinus1.Value,"End_Fund_Balance"))*(Sum(Fields!RGF_MIN_1.Value, "Revenue")/first(Fields!RGF_MIN_1.value,"Rev_Code5899"))<
    0, 0.00, (Sum(Fields!SR_MINUS_1.Value, "Certificated_Exp")-first(Fields!RSR_MIN_1.Value,"Rev_Code5899")-first(Fields!End_FundMinus1.Value,"End_Fund_Balance"))*(round(Sum(Fields!RGF_MIN_1.Value, "Revenue")/first(Fields!RGF_MIN_1.value,"Rev_Code5899"),6))))
    / (First(Fields!WADA2012_1.Value, "Second_Year_Preceeding_WADA")))
    IIF((Sum(Fields!RSR_MIN_2.Value, "Revenue") + IIF((Sum(Fields!SR_Minus_2.Value, "Certificated_Exp") - First(Fields!RSR_MIN_2.Value, "Rev_Code5899") - First(Fields!End_Fund_min2.Value, "End_Fund_Balance")) * (Sum(Fields!RGF_MIN_2.Value,
    "Revenue") / First(Fields!RGF_MIN_2.Value, "Rev_Code5899"))< 0, 0.00, (Sum(Fields!SR_Minus_2.Value, "Certificated_Exp") - First(Fields!RSR_MIN_2.Value, "Rev_Code5899") - First(Fields!End_Fund_min2.Value, "End_Fund_Balance"))
    * (round(Sum(Fields!RGF_MIN_2.Value, "Revenue") / First(Fields!RGF_MIN_2.Value, "Rev_Code5899"),6))))/(First(Fields!WADA2011_1.Value, "Second_Year_Preceeding_WADA")) < 0, 0.00, (Sum(Fields!RSR_MIN_2.Value, "Revenue")
    + IIF((Sum(Fields!SR_Minus_2.Value, "Certificated_Exp") - First(Fields!RSR_MIN_2.Value, "Rev_Code5899") - First(Fields!End_Fund_min2.Value, "End_Fund_Balance")) * (Sum(Fields!RGF_MIN_2.Value, "Revenue") / First(Fields!RGF_MIN_2.Value,
    "Rev_Code5899"))< 0, 0.00, (Sum(Fields!SR_Minus_2.Value, "Certificated_Exp") - First(Fields!RSR_MIN_2.Value, "Rev_Code5899") - First(Fields!End_Fund_min2.Value, "End_Fund_Balance")) * (round(Sum(Fields!RGF_MIN_2.Value,
    "Revenue") / First(Fields!RGF_MIN_2.Value, "Rev_Code5899"),6))))/(First(Fields!WADA2011_1.Value, "Second_Year_Preceeding_WADA"))) * (first(Fields!WADA2013_1.Value,"Second_Year_Preceeding_WADA"))
    IIF((Sum(Fields!RSR_MIN_1.Value, "Revenue") + IIF((Sum(Fields!SR_MINUS_1.Value, "Certificated_Exp")-first(Fields!RSR_MIN_1.Value,"Rev_Code5899")-first(Fields!End_FundMinus1.Value,"End_Fund_Balance"))*(Sum(Fields!RGF_MIN_1.Value,
    "Revenue")/first(Fields!RGF_MIN_1.value,"Rev_Code5899"))< 0, 0.00, (Sum(Fields!SR_MINUS_1.Value, "Certificated_Exp")-first(Fields!RSR_MIN_1.Value,"Rev_Code5899")-first(Fields!End_FundMinus1.Value,"End_Fund_Balance"))*(round(Sum(Fields!RGF_MIN_1.Value,
    "Revenue")/first(Fields!RGF_MIN_1.value,"Rev_Code5899"),6)))) / (First(Fields!WADA2012_1.Value, "Second_Year_Preceeding_WADA")) < 0, 0.00, (Sum(Fields!RSR_MIN_1.Value, "Revenue") + IIF((Sum(Fields!SR_MINUS_1.Value,
    "Certificated_Exp")-first(Fields!RSR_MIN_1.Value,"Rev_Code5899")-first(Fields!End_FundMinus1.Value,"End_Fund_Balance"))*(Sum(Fields!RGF_MIN_1.Value, "Revenue")/first(Fields!RGF_MIN_1.value,"Rev_Code5899"))<
    0, 0.00, (Sum(Fields!SR_MINUS_1.Value, "Certificated_Exp")-first(Fields!RSR_MIN_1.Value,"Rev_Code5899")-first(Fields!End_FundMinus1.Value,"End_Fund_Balance"))*(round(Sum(Fields!RGF_MIN_1.Value, "Revenue")/first(Fields!RGF_MIN_1.value,"Rev_Code5899"),6))))
    / (First(Fields!WADA2012_1.Value, "Second_Year_Preceeding_WADA"))) * (first(Fields!WADA2013_1.Value,"Second_Year_Preceeding_WADA")))
    A screen shot of the report:
    The value in the bottom box should be: 37,080,118.75
    I have tried:
    =IIF(ReportItems!Textbox293.Value > ReportItems!Textbox294.Value, ReportItems!Textbox293.Value * ReportItems!Textbox289.Value, ReportItems!Textbox294.Value * ReportItems!Textbox289.Value) and I get a scope error.
    I have also tried 
    =IIF(CDbl(Fields!Textbox293.Value) > CDbl(Fields!Textbox294.Value), CDbl(FieldsTextbox293.Value) * CDbl(Fields!Textbox289.Value), CDbl(Fields!Textbox294.Value) * CDbl(Fields!Textbox289.Value))
    I get the same scope error, part of the problem here is that in order to get things to display correctly each row in this section of the report is a different table
    Row1 = tablix19
    Row2 = tablix20
    Row3 = tablix21
    Any help here would be great

    Hello,
    In your case, we can try to use Report Variables to resolve the issue. In SSRS, when we have a complex calculation we can create a variable in the report. Variable can be used more than once in a report. Please refer to the following steps:
    Open Report Properties dialog box.
    Click Variables in the left pane. Then, add specific variable.
    (Note: Suppose we have create two variables: textbox293, textbox294)
    After that, we can use following expression to calculate the effect:
    =IIF(Variables! textbox293.Value > Variables! textbox294.Value,
    Variables! textbox293.Value * ReportItems!Textbox289.Value,
    Variables! textbox294.Value * ReportItems!Textbox289.Value)
    Reference:
    Report and Group Variables Collections References
    If the issue is persist, please feel free to let me know.
    Regards,
    Alisa Tang
    If you have any feedback on our support, please click
    here.
    Alisa Tang
    TechNet Community Support

  • Exclude NULL values from SUM and AVG calculation

    Hi,
    I have column in report that contains some NULL values. When i perform SUM,MAX,MIN or AVG calculation on this column the NULL values are treated as '0' and included in calculation. Is there any way to exclude them while calculating aggregate functions? 
    As a result MIN calculation on values (NULL,0.7,0.5,0.9) gives me output as 0 when it should have been 0.5 
    Can someone please help ?
    Thanks and Regards,
    Oliver D'mello

    Hi Oliver,
    According to your description, you want to ignore the NULL values when you perform aggregation functions.
    In this scenario, aggregate functions always ignore the NULL values, because their operation objects are non-null values. So I would like to know if you have assigned “0” for NULL values. I would appreciate it if you could provide some screenshots about
    your expressions or reports.
    Besides, we have tested in our environment using  Min() function. The expression returns the minimum value among the non-null numeric values. Please refer to the screenshots below:
    Reference:
    Min Function (Report Builder and SSRS)
    Aggregate Functions Reference (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu

Maybe you are looking for