reporting services - How to divide slices of pie chart based on condition in ssrs -


i have dataset below:

a 20 b 30 c 45 d 15 e 05 

now want display them in pie chart in such way: value <= 20 1 slice (i.e. 3 in our case) , values >20 other slice of pie chart(i.e 2 in our example). pie chart have 2 slices :

  1. display count(number of values) <= 20
  2. display count(number of values) > 20.

can please help. in advance.

you have of work in report's dataset.

/*creating dummy table*/  select 'a' name, 20 value dbo.test union  select 'b', 30 union select 'c', 45 union select 'd', 15 union select 'e', 05  /*report data set query*/  select '<=20' bracket,(select count(1) dbo.test value <=20) cnt union select '>20',(select count(1) dbo.test value >20)  

in rdl, drop bracket on category axis , sum(cnt) on values.

enter image description here

your report should this:-

enter image description here


Comments