Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Could someone kindly tell me how to calculate YTD and MTD sales for financial years having the format 2010-11.
Thanks a lot in advance
Gaurav V.
HI plzz find the below code :
YTD--------------
COUNT(DISTINCT{$<[CAL YEAR] = {$(=max([CAL YEAR]))}, Cal_Month_No ={"<=$(=max({<[CAL YEAR]={$(=max([CAL YEAR]))}>} Cal_Month_No))"}>} [CASEID])
MTD--------------
COUNT(DISTINCT {$<GEO={'APAC'},[CAL YEAR] = {$(=max([CAL YEAR]))}, Cal_Month_No = {"<=$(=max({<[CAL YEAR]={$(=max([CAL YEAR]))}>} Cal_Month_No))>$(=max({<[CAL YEAR]={$(=max([CAL YEAR]))}>} Cal_Month_No)-1)"}>} CASEID)
QTD---------------
COUNT(DISTINCT {$<GEO={'APAC'},[CAL YEAR] = {$(=max([CAL YEAR]))}, Cal_Qtr = {$(=MaxString({<[CAL YEAR]={$(=max([CAL YEAR]))}>} Cal_Qtr))}, Cal_Month_No = {"<=$(=max({<[CAL YEAR]={$(=max([CAL YEAR]))}>} Cal_Month_No))"}>} CASEID)
you can also use the function YTD , MTD ------> refer help in qlikview
Hi,
Use this code for find MTD,FTD,YTD
Use this Variable to find MTD,YTD,FTD
-------------------------------------------------------------------------------------------
VD(Maxday)=Max(if(ACFinYear=VY and AccountMonthNo=VM, AccoutnDay))
-------------------------------------------------------------------------------------------
VM(Maxmonth)=Max(if(ACFinYear=VY, AccountMonthNo))
-------------------------------------------------------------------------------------------
VY(MaxYear)= =Max(ACFinYear)
-------------------------------------------------------------------------------------------
Expression
----------------------------------------------------------------------------------------------------
MTD=sum(if(VY=CompareYear123 and VM=CommMonth and VD>=Pday, AMOUNT))
----------------------------------------------------------------------------------------------------
YTD=sum(if(VY=CompareYear123 and ((VM*100)+VD)>=Month_Day, AMOUNT))
---------------------------------------------------------------------------------------------------
FTD=sum(if(VY=CompareYear123 and VM=CommMonth and VD=Pday, AMOUNT))
---------------------------------------------------------------------------------------------------
Regards
Kaushal mehta
Dear
This Very old approach, Common Boss
Hi,
The new approach ( using Set Analysis) was already listed. Hence I thought of suggesting an alternative which can be incorporated in the versions prior to QV 9.0.
Regards
Kaushal Mehta
Many-Many thanks Aswin....
Hope you are doing best in your life....
would speak to you soon...
bye...
Many - many thanks , dear Kaushal.....
Dear Ashwin,
Hope you doing well....
Please tell me how to calculate YTD for any fiscal year in the past like 2010-11. Our fiscal starts from July and ends in Jun.
Also, kindly tell me, how to come come up with sum of sales for any number of monthyears in any fiscal year.
For eg. if you select 2010-11 which starts on 1st July and ends on 31 Jun. If a user selects 14 feb 2011, he should get the sales for the period - 1st July 2010 to 14Feb2011.
Thanks for your help...
Gaurav VArshney
Dear Kaushal,
Hope you doing well....
Please tell me how to calculate YTD for any fiscal year in the past like 2010-11. Our fiscal starts from July and ends in Jun.
Also, kindly tell me, how to come come up with sum of sales for any number of monthyears in any fiscal year.
For eg. if you select 2010-11 which starts on 1st July and ends on 31 Jun. If a user selects 14 feb 2011, he should get the sales for the period - 1st July 2010 to 14Feb2011.
Thanks for your help...
Gaurav VArshney
HI gaurav , I am fi9 and nw days in mumbai. what about u .????
Please use the Inline Table for Financial Year. And link it with the calender.
This is also available in the Tutorials you can refer how to make Quarters and Fiscal Year.
You can contact me +91 9769948351