Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I need to calculate the numbers for the current quarter minus the previous quarter. I'm not sure how I can get the right values. I came across multiple blogs regarding date calculations; however, none has worked so far. I'm using this expression for the current month, which is working fine
=sum({<QuarterYear={'$(=MaxString(QuarterYear))'}>}budget)
the same syntax is not working for the previous quarter =sum({<QuarterYear={'$(=MaxString(QuarterYear)-1)'}>}budget)
Could anyone please their thoughts on this? How can I make it work?
I would suggest create two variable in master calender for better perforamnce like.
Set VCurrentQtr='q' & ceil(month(today())/3)&year(today())
Set vPreviousqtr='q' & ceil(month(addmonth(today())())/3)&year(addmonths(today(),-3))
Create quarter Year in your mastercalender
'q' & ceil(month(orderdate)/3)&year(orderdate)
Create a Variable in Front end
vSalesQoQ=sum({<QuarterYear={$(VCurrentQtr)}>}Sales)-sum({<QuarterYear={$(vPreviousqtr)}>}Sales)
and use the vSalesQoQ on your chat where you require
Hi Chinmayadash,
Thanks for the reply! I have created these variables at the data load editor and its not working.
Set VCurrentQtr='q' & ceil(month(today())/3)&year(today())
Set vPreviousqtr='q' & ceil(month(addmonth(today())())/3)&year(addmonths(today(),-3))
Thank you for your help.