简体   繁体   中英

SSRS Calculated Conditional Field

I have a stored procedure that assigns a "totalstype_number" based on the field (1=AGS, 2=invoice count, etc). When I want to display a given totals type, I group by the totalstype, and filter it to totalstype ="1" (or whatever number I am trying to populate). What I need to do is create a field that takes totaltype = 1 and divide it by totalstype = 2. I am not really sure how to go about this, I have tried doing it at the tablix level, but I am not sure how to set my row group to group by. Column groups are by channel (# 1-5) and then 2 adjacent child groups underneath that are value1 (year1) and value2 (year2).Thanks!

You do not need to work with the SSRS, modify your query in your SP instead, add group by totalstype and count(*) as total_Number_this_salesType in your original SP, the easiest way is to have two more parameters to store the total number for each sales_type. Which would be like:

@parameter1 = (query to get total number of sales type 1)
@parameter2 = (query to get total number of sales type 2)

then populate @parameter1/@parameter2

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM