Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
I would like to know how Quarter Till Date(QTD) logic wil work .
Can any one explain with some sample data.
Thanks
Current Year QTD
=num(sum({$<Year = {$(=only(Year))}, Quarter = {$(=only(Quarter))}, Month = {"<=$(=max(Month))"}>} LineSalesAmount), '$#,##0;($#,##0)')
Previous Year QTD
=num(sum({$<Year = {$(=only(Year) - 1)}, Quarter = {$(=only(Quarter))}, Month = {"<=$(=max(Month))"}>} LineSalesAmount), '$#,##0;($#,##0)')
Hi,
QTD is the cumulative result from 1st day of the quarter to the current day. Lets say you have sales amount everyday, e.g:
You want to calculate the QTD sales, being filtered 25/03/2015, so QTD should add sales amount from 1st January to 25/03/2015, as your current point of view is the first Quarter.
If your filter is for example 19/07/2014, then you are at Quarter 3, so QTD for Q1 is the cumulative sales amount of whole Q1, the same for Q2, and for Q3 should be from 1st of July till 19/07/2014
Hope this helps.
Regards,
Jose
Thank you very nice explanation.
so how do we achieve this QTD, lets say I need to calculate the sales amount till today.
So how we can achieve,i think we need to use set analysis. How do we write set analysis function here???
Thanks
hi,are u tried the above expressions?
Look Shiva expressions
Thanku , I tried your expression but facing some error.
=Sum({$< Year = {$(#vYear)}, Quarter = {$(#vQuarter)} , Month = {<=$(#vMonth)}>} sales)
Any one correct me where i was wrong.
can u try this,else share ur error?
=num(sum({$<Year = {$(=only(vYear))}, Quarter = {$(=only(vQuarter))}, Month = {"<=$(=max(vMonth))"}>} sales), '$#,##0;($#,##0)')
There is no need for set analysis here. Use function InQuarterToDate
Current quarter:
=sum(if(InQuarterToDate(Date, today(),0), sales))
Previous Quarter:
=sum(if(InQuarterToDate(Date, today(),-1), sales))
Previous Year same Quarter:
=sum(if(InQuarterToDate(Date, today(),-4), sales))
Hi Shiva,
By Applying your expression its giving me the MTD data.Not QTD data.
Regards,
KK