Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Mansi12345
Contributor
Contributor

Current Year Rangesum Vs Previous Year Same Month Rangesum against CY Month Year Dimension

Mansi12345_0-1676344788615.png

 

I need to show PYTest values for Aug 2021,Sep 2021 and Oct 2021 values in Jul 2022 ,Sep 2022 and Oct 2022 i.e 3,10.5,13 above Current Year blue line(CY Monthly Lytics) which is showing 6,13 and 21. Also the Values from Aug 21-Apr 2021 should not be seen...We are taking Financial year which Starts from July and ends at June.

 

I have CurrFYFlag and PYFYFlag also if needed.

Monthly Lytics I am using;

=sum(aggr(rangesum(above(sum({<[Invoice Date]={">=$(=YearStart(max([Invoice Date]),0,7))<$(=YearEnd(max(Date),0,7))"},CurrFYFlag={1}
>}[340B Purchase Eqv Qty]),0,rowno())),[340B MPN ID],MonthYear))

 

and PY Lytics I am using;

=rangesum(above(sum({<[Invoice Date]={">=$(=YearStart(max([Invoice Date]),-1,7))<$(=YearEnd(max([Invoice Date]),-1,7))"},CurrFYFlag
>}[340B Purchase Eqv Qty]),0,rowno()))

 

The PY lytics is adding Current year values 6,7,8 in its last value (last month showing April as there is no data for may and June) and showing from July 2022 onwards.

PY Rangesum was 3,11,13(Aug,Sep,Oct)

CY rangesum is 6,13,21(Jul,Sep,Oct)

As per this it should show 0,11,13 and 6,13,21 for Jul2022,Sep2022,Oct2022

 

can we achieve this?, Kindly help.

 

 

Labels (1)
0 Replies