开发者

SSRS 2005 conditional count in chart: how-to?

开发者 https://www.devze.com 2023-01-15 11:07 出处:网络
I have a column chart in which I want to display the % of Invoiced Sales in 24 hours and % of Not Invoiced Sales in 24 hours. The data should be categorized by date, so for each date I can see the % o

I have a column chart in which I want to display the % of Invoiced Sales in 24 hours and % of Not Invoiced Sales in 24 hours. The data should be categorized by date, so for each date I can see the % of invoiced and not invoiced sales within 24 hours.

My dataset contains:

  • sales id,
  • sales status (only invoiced are permitted and I took care of that in my query),
  • date and
  • nbDays, which is bound to a function that determines if the sale is invoiced in 24h. (if the nbDays < 3 it's in 24h otherwise it's not)

I want my chart to display for each date two column: 1- for invoiced in 24, 2- not invoiced in 24 h. So, I drag the date fields to Category fields area and sales id twice to Data fields area. The idea is to use one for invoiced in 24h and the other is for the other case.

How can I write a conditional expression to get this requirement done and make the data 开发者_JAVA百科fields sales id displays data according to my condition?

I tried this but it didn't work:

=count(iif(fields!nbDays.value <3, 1,0))  

and also the:

=iif(fields!nbDays.value <3, count(fileds!salesid.value),0)


Use the first one but use a SUM not a COUNT. eg.

=sum(iif(fields!nbDays.value <3, 1,0))  
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号