# QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

## Showing a Quarter's Total Based on Month Selection

Hello,

I am trying to find a way to use the data from an entire quarter in the chart calculation based only on a month selection. For instance, if i have February 2016 selected as my filter, I would like the chart to display data from January, February, and March of 2016. If I select April 2016, I would like the chart to display data from April, May, and June of 2016. Is there a way to do this in the expression of the chart?

Below is a similar post that remained unanswered.

Set Analysis and Quarter selection?!?! | Qlik Community

Thanks for your help!

Tags (4)
1 Solution

Accepted Solutions
MVP

## Re: Showing a Quarter's Total Based on Month Selection

I think you can use a calendar with a quarter field and a set analysis that disregard the month selected and use the quarter

something like

sum({\$ <Month=,Quarter=P(Quarter)>}  measure)

EDIT

see the attachment

4 Replies
MVP

## Re: Showing a Quarter's Total Based on Month Selection

I think you can use a calendar with a quarter field and a set analysis that disregard the month selected and use the quarter

something like

sum({\$ <Month=,Quarter=P(Quarter)>}  measure)

EDIT

see the attachment

MVP

## Re: Showing a Quarter's Total Based on Month Selection

Try this:

Sum({<MonthYear, Quarter = p(Quarter)>}Sales)

Not applicable

## Re: Showing a Quarter's Total Based on Month Selection

This works! Thank you!

MVP

## Re: Showing a Quarter's Total Based on Month Selection

If you got what you were looking for, please close this thread by marking correct and helpful answers

Qlik Community Tip: Marking Replies as Correct or Helpful