SQL 2008 - DISPLAY 12 MONTHS DATA

  • HI All,

    Wonder if anyone has a solution for the following,

    I had created a tablix with column groups - problem is that if a product does not have any sales for a month it does not display the month so for example JAN - MAR ETC. - FEB is missed as no data

    23 45

    So I though I could achive this by doing below

    columns as Jan - Feb - Mar - Apr -May - Jun - Jul - Aug - Sep - Oct - Nov - Dec

    Product 3 45 21 11 65 44 2 77 98

    I though by dooing the following

    =iif(Month(Fields!Date_String.Value) = 2 ,sum(Fields!Qty_9_Litre_Invoiced.Value),"")

    I thought it would display in this expression the value for February - it just gives me the total instead

    My goal is to have a static 12 months display regardless if data exists or not with the correct amounts in the correct field month.

    Data comes from a cube.

    I use the date picker parameters using inclusive range

  • You could either use a calendar table on the DB side and modify the query/view to use a left outer join on the calendar table or you could create one on the fly within your SSRS query (never tried though...).



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply