0
votes

enter image description hereI need your help. I have a matrix report in ssrs 2008. The report contain one field value column and one value column. I need to calculate a percentage for two values. For example : row 1 : Discount 10 Row 2 : Sales 100 Result : 10/100.

1
Can you show me what you've tried? From the description provided, it sounds like you can just divide Fields!Discount.Value/Fields!Sales.Value and format it. If you can, please include a screenshot.Michael
Hi Michael thank you for your response.What I am trying to do is to calculate percentage between two values which is found in the same column. I need to have something like this "If column.value = % Discount then sum(value) where column.value = discount / sum(value) where column.value = Turnover" The % Discount,Discount and Turnover is found in the same column but on different rows. I am attaching snapshot of my matrix report. Thank you in advanceMonshine

1 Answers

0
votes

Output screenshot attached (Image URL : http://i.stack.imgur.com/WroU4.png)

    IF EXISTS (SELECT * FROM tempdb..sysobjects WHERE id=OBJECT_ID('tempdb..#Student')) DROP TABLE #Student


    CREATE TABLE #Student
    (
        id INT,
        NAME VARCHAR(100),
        TotalMark INT
    )
    ![enter image description here][1]
    INSERT INTO #Student VALUES ( 1,'Sanjay',635)
    INSERT INTO #Student VALUES ( 2,'Vinay',810)
    INSERT INTO #Student VALUES ( 3,'Ajay',799)
    INSERT INTO #Student VALUES ( 4,'Jay',560)

    SELECT * FROM #Student



Column Value : =str(Fields!TotalMark.Value *100 /1000)+"%"