Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 20764

ssrs calculate ytd across the columns of a percentage row

$
0
0

I have SSRS 2008 tablix region where the columns are State,Category,January, February, March,...,December, YTD. I have pivoted the table in sql server and have all the sums (total sales, etc) and percentages (product category% of total, etc)for each month (columns). I need help to calculate the YTD when the column is %.

example:

State Category January   February    March......YTD

MN     A              200         200            0......       400

MN     B              21          12............   0........      33

MN     A%           12.5        12.5           0........      ??

For A,B above, the YTD is simply adding the report items January+February+March+....

For A% above(??), since this a percent column, my YTD should be the average of the non-null columns...in this case (12.5+12.5)/2=12.5 but I am unable to find out the count of the non-null columns for each category (January, February, etc)...I have tried ave,count, sum, etc but i am not getting the correct value. If I can figure out the denomintor(which will be the count of the non-null columns in January, February,...,December), the problem will be solved.


Viewing all articles
Browse latest Browse all 20764

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>