sql - Adding values between range of values in SSRS -
i creating ssrs report , having 1 dimension table , contain 1 field "no_of_stories" , 1 fact table column "total_tiv" . want output in following format.
range | tiv 1 | 1000 2 3 | 20000 4 7 | 30000
is there method solve using sql query or there expression in ssrs resolve ?
select case when no_of_stories = 1 '1' when no_of_stories >= 2 , no_of_stories < 4 '2 3' when no_of_stories >= 4 , no_of_stories < 8 '4 7' -- add other ranges here else 'more 7' -- or whatever maximum range end range, sum(tiv) total_tiv mytable group case when no_of_stories = 1 '1' when no_of_stories >= 2 , no_of_stories < 4 '2 3' when no_of_stories >= 4 , no_of_stories < 8 '4 7' -- add other ranges here else 'more 7' -- or whatever maximum range end order max(no_of_stories)
Comments
Post a Comment