# QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
Partner

## Aggr and Set analysis for YoY analysis

Hi All,

I have a report which should show year over year analysis for selected month.

below formula works perfectly fine i.e. selected moth and all previous year from selected year.

```Sum({<fiscalmonthnbr={"\$(=max(fiscalmonthnbr))"}, Year={"<=\$(=max(Year))"}, [State]-={'Cancelled'}>}
[Aging Hours])```

But, when i apply aggr to above formula it is showing only selected moth and year(not giving data for previous years).

```=Sum({<fiscalmonthnbr={"\$(=max(fiscalmonthnbr))"}, Year={"<=\$(=max(Year))"}, [State]-={'Cancelled'}>}
Aggr(sum([Aging Hours]),Number,State,Group,Name))```

appreciate your support in resolving.

Regards,

Sravan

Labels (3)

• ### Set Analisys

1 Solution

Accepted Solutions

## Re: Aggr and Set analysis for YoY analysis

Perhaps this?

```=Sum({<fiscalmonthnbr={"\$(=max(fiscalmonthnbr))"}, Year={"<=\$(=max(Year))"}, [State]-={'Cancelled'}>}
Aggr(sum({<fiscalmonthnbr={"\$(=max(fiscalmonthnbr))"}, Year={"<=\$(=max(Year))"}, [State]-={'Cancelled'}>}[Aging Hours]),Number,State,Group,Name))```
Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
```=Sum({<fiscalmonthnbr={"\$(=max(fiscalmonthnbr))"}, Year={"<=\$(=max(Year))"}, [State]-={'Cancelled'}>}