Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
I would like to find the below:
1) Previous Quarter for the same Year.
2) Same Quarter for the Last Year.
3) Same Quarter for the Last Last Year.
This is my expression for Max Quarter:
sum( {$<YEAR = {$(=Max(YEAR))} ,MONTHNO={$(=Max(MONTHNO))}, MONTH= , PERIODDISPLAY= , QUARTER= {$(=MaxString(QUARTER))} , HALFYEAR= >} [VV] )
Below is my master calendar:
Anyone, Please Help!!!
Thank you!!
Hello,
Try this:
1) Previous Quarter for the same Year
sum( {$<YEAR = ,MONTHNO=, MONTH= , PERIODDISPLAY= , QUARTER= , HALFYEAR= ,Num={">= $(=Num(QuarterEnd(Max(Date),-1)) ) <=$(=Num(QuarterEnd(Max(Date),-1)))"}>} [VV] )
2) Same Quarter for the Last Year
sum( {$<YEAR = {$(=Max(YEAR)-1)} ,MONTHNO=, MONTH= , PERIODDISPLAY= , QUARTER= {$(=MaxString(QUARTER))} , HALFYEAR= >} [VV] )
3) Same Quarter for the Last Last Year
sum( {$<YEAR = {$(=Max(YEAR)-2)} ,MONTHNO=, MONTH= , PERIODDISPLAY= , QUARTER= {$(=MaxString(QUARTER))} , HALFYEAR= >} [VV] )
Hope it helps.
You can easily base everything on the Date field
Current Quarter, same Year
sum( {<Date = {">=$(=Date(Quarterstart(Max(Date)),'DD/MM/YYYY'))<=$(=Date(Quarterend(Max(Date)),'DD/MM/YYYY'))"}>}[VV])
Previous Quarter, Same Year
sum( {<Date = {">=$(=Date(Quarterstart(Max(Date),-1),'DD/MM/YYYY'))<=$(=Date(Quarterend(Max(Date),-1),'DD/MM/YYYY'))"}>}[VV])
Same Quarter, Last Year
sum( {<Date = {">=$(=Date(Quarterstart(addyears(Max(Date),-1)),'DD/MM/YYYY'))<=$(=Date(Quarterend(addyears(Max(Date),-1)),'DD/MM/YYYY'))"}>}[VV])
Same Quarter, Last Last Year
sum( {<Date = {">=$(=Date(Quarterstart(addyears(Max(Date),-2)),'DD/MM/YYYY'))<=$(=Date(Quarterend(addyears(Max(Date),-2)),'DD/MM/YYYY'))"}>}[VV])
Hello,
Try this:
1) Previous Quarter for the same Year
sum( {$<YEAR = ,MONTHNO=, MONTH= , PERIODDISPLAY= , QUARTER= , HALFYEAR= ,Num={">= $(=Num(QuarterEnd(Max(Date),-1)) ) <=$(=Num(QuarterEnd(Max(Date),-1)))"}>} [VV] )
2) Same Quarter for the Last Year
sum( {$<YEAR = {$(=Max(YEAR)-1)} ,MONTHNO=, MONTH= , PERIODDISPLAY= , QUARTER= {$(=MaxString(QUARTER))} , HALFYEAR= >} [VV] )
3) Same Quarter for the Last Last Year
sum( {$<YEAR = {$(=Max(YEAR)-2)} ,MONTHNO=, MONTH= , PERIODDISPLAY= , QUARTER= {$(=MaxString(QUARTER))} , HALFYEAR= >} [VV] )
Hope it helps.
You can easily base everything on the Date field
Current Quarter, same Year
sum( {<Date = {">=$(=Date(Quarterstart(Max(Date)),'DD/MM/YYYY'))<=$(=Date(Quarterend(Max(Date)),'DD/MM/YYYY'))"}>}[VV])
Previous Quarter, Same Year
sum( {<Date = {">=$(=Date(Quarterstart(Max(Date),-1),'DD/MM/YYYY'))<=$(=Date(Quarterend(Max(Date),-1),'DD/MM/YYYY'))"}>}[VV])
Same Quarter, Last Year
sum( {<Date = {">=$(=Date(Quarterstart(addyears(Max(Date),-1)),'DD/MM/YYYY'))<=$(=Date(Quarterend(addyears(Max(Date),-1)),'DD/MM/YYYY'))"}>}[VV])
Same Quarter, Last Last Year
sum( {<Date = {">=$(=Date(Quarterstart(addyears(Max(Date),-2)),'DD/MM/YYYY'))<=$(=Date(Quarterend(addyears(Max(Date),-2)),'DD/MM/YYYY'))"}>}[VV])
@vinieme12 @HugoRomeira_PT
Thank you for your help!!!
Much Appreciated!