Converting Quarters to Relative Months

Hello,

How can I convert a quarter, such as Q3, into its corresponding range of months, for example, from July to September?

Hello @P_G !

Depending on how your dataset is set up there could be a few options.

If you want to filter your dataset by Quarters but have it displayed by Month, you could create a relative date filter using your date field and then on the visual level, in the field well set your date field aggregate to MONTH. You could also achieve that with parameter value.

Another way, if you need to manipulate your date is using an ifelse statement:

ifelse(
{date_field} = 'Q1',
"Jan." AND "Feb." AND "Mar.", 
etc...,
NULL
)

You might need to play with the set up for that function, especially around the AND vs OR for the months.

Let me know if this helps!

Hi @duncan, thanks for this!
When I aggregate the data by quarter, they appear, for example, on the horizontal axis of the graph as Q1, Q2, Q3, and Q4. I would like to change those labels into the relative months, for example, instead of having Q3 as a label, I would like to have Jul - Sept instead.

Hey @P_G !

That’s what I described in the first part of my response. To show only the months you can go into the field well and update the date aggregation to months. Then, if you would like to only show the months that correspond to a particular Quarter, you can create a relative date filter and set the relative period to Quarters.

Hey @P_G !

To clarify your question, what does your date field look like? Is your date field aggregated by Quarters already?

Hi @P_G

Does suggestion from @duncan helped to resolve the requirement?
if not could you please share a screenshot of the visual along to better understand your question

Thanks
VInod

1 Like

Hi, Yes it helped. Thanks both!

1 Like