Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
sravankv
Partner - Contributor III
Partner - Contributor III

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 (1)
1 Solution

Accepted Solutions
Anil_Babu_Samineni

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))
Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

1 Reply
Anil_Babu_Samineni

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))
Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful