mayo
mayo

Reputation: 163

SSRS: show the Quarter in the chart

I would like to show in the y-axis the quarter instead of the month:

[![enter image description here][1]][1]

How can I do this.

Below is my query:

SELECT *
    FROM (
    Select intervaldateMonth as Month, intervaldate as DateValue, intervalDateWeek as Datum,

SUM(GoodUnits) As GoodUnits,
SUM(TheoreticalUnits) As TheoreticalUnits,


from Count inner join tsystem ON Count.systemid = tsystem.id
    where IntervalDateMonth >=getdate()-420
AND ((DATEPART(dw, IntervalDate) + @@DATEFIRST) % 7) NOT IN (0,1)
    and tsystem.ID in  (Select SystemID from tSystemViewSystem where SystemViewID = 2)                          
    group by intervaldatemonth, intervaldate, intervaldateweek
    ) as s

Upvotes: 1

Views: 1041

Answers (1)

alejandro zuleta
alejandro zuleta

Reputation: 14108

To get the quarter of the date you can use this expression in Category Groups:

="Q" & DatePart(DateInterval.Quarter,Fields!DateValue.Value) 

UPDATE:

Go to Category Groups properties:

enter image description here

And use the expression in Label and Group on properties.

enter image description here

You will get something like this:

enter image description here

Let me know if this helps.

Upvotes: 1

Related Questions