# New to QlikView

Discussion board where members can get started with QlikView.

Contributor

## Re: Previous Quarter Year Calculation

Hi Sunny,

As you mentioned,

So if i create the new field as

`=QuarterStart(MakeDate(Left(QuarterYear, 4), Right(QuarterYear, 1)*3)) as QuarterYear_New`

Then the set analysis would be:

`Sum({<QuarterYear_new = {"\$(=QuarterStart(Max(QuarterYear_nee), -1))"}>} Measure)`

Is that right?

Thanks,

BC

MVP

## Re: Previous Quarter Year Calculation

Yup, this

`Sum({<QuarterYear_new = {"\$(=QuarterStart(Max(QuarterYear_new), -1))"}>} Measure)`

Contributor

## Re: Previous Quarter Year Calculation

Thanks Sunny!

I am Not sure why but when i do sum(Measure) i get some value for example but with your calculation i get 0.

Thanks,

BC

MVP

## Re: Previous Quarter Year Calculation

Are you making selection in any date or time field?

Contributor

## Re: Previous Quarter Year Calculation

Yes, I am making selections on the QuarterYear field.

MVP

## Re: Previous Quarter Year Calculation

Then you need to ignore selection in that field because selection and set analysis are contradicting each other

`Sum({<QuarterYear_new = {"\$(=QuarterStart(Max(QuarterYear_new), -1))"}, QuarterYear>} Measure)`

Contributor

## Re: Previous Quarter Year Calculation

Hi Sunny,

If i cant get values by That field selections then the solution wont be useful for my situation. :smileysad:

Thanks,

BC

MVP

## Re: Previous Quarter Year Calculation

My friend, have you even tried it? 🙂 do everything as you would want to... but just use the new expression
Highlighted
Contributor

## Re: Previous Quarter Year Calculation

Hi Sunny, I actually tried before replying to you. :mantongue:

But ignoring the selection field has no effect on the calculation. So how do i get any previous period based on the selection if i cant select the field?

I am confused though.

Thanks,

BC

MVP

## Re: Previous Quarter Year Calculation

So, you select a single QuarterYear and use this expression

`Sum({<QuarterYear_new = {"\$(=QuarterStart(Max(QuarterYear_new), -1))"}, QuarterYear>} Measure)`

and nothing happens? What do you mean when you say nothing happens? See 0s? or nothing get filtered out?

Would you be able to share a sample to show the issue? This can be a small issue, but very difficult to know without something to look at.