3 Replies Latest reply on Oct 3, 2018 2:17 PM by susheela.hegde

# How To display Data in months when selected Quarter

Hi All,

This is an easy problem but I am unable to get this when I have a Period Parameter.

I have a Parameter to select day, month, quarter etc.  How ever, When I select Parameter Quarter , I want the data to be displayed as Months instead of quarter.

I can do this if I individually want to select quarter but not as a parameter along with other periods.

also, how do we exclude current day, current month, current week, current quarter as we change the Period Parameter?

• ###### 1. Re: How To display Data in months when selected Quarter

See if this helps:

And to exclude the current period, you can create another calculated field as shown below and use in the filters:

Updated workbook attached.

• ###### 2. Re: How To display Data in months when selected Quarter

hI Susheela,

I can get like this

Changes to your calculations as below

(CASE [Time Period Selection]

WHEN "day" THEN STR([Order Date])

WHEN "week" THEN STR(DATETRUNC('week',[Order Date]))

WHEN "month" THEN STR(DATETRUNC('month',[Order Date]))

WHEN "quarter" THEN

( if DATEPART('month',[Order Date]) <= 3 then

'Q1-'+   LEFT(  STR(DATETRUNC('month',[Order Date])),10)

ELSEIF

DATEPART('month',[Order Date]) <= 6 then

'Q2-'+   LEFT(  STR(DATETRUNC('month',[Order Date])),10)

ELSEIF

DATEPART('month',[Order Date]) <= 9 then

'Q3-'+   LEFT(  STR(DATETRUNC('month',[Order Date])),10)

ELSEIF

DATEPART('month',[Order Date]) <= 12 then

'Q4-'+   LEFT(  STR(DATETRUNC('month',[Order Date])),10)

END

)

WHEN "year" THEN STR(DATETRUNC('year',[Order Date]))

END)

WHEN "year" THEN STR(DATETRUNC('year',[Order Date]))

END)