Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
techvarun
Specialist II
Specialist II

YTD Creation

Hi Qlixperts,

My Financial year is between Oct- Sep,

I need to store all the months in between the YTD Start and Current month-1 in a variable to use the same in a set analysis.

For Eg: YTDStart : OCT

            Current Month : July

I want to store all the Months between Oct to June (CurrentMonth-1) in a variable like this.

vYTD:'Oct','Nov','Dec','Jan','Feb','Mar','Apr','May','Jun'

Your help is much appreciated

5 Replies
techvarun
Specialist II
Specialist II
Author

Any ideas?

Anil_Babu_Samineni

Steps followed

1) I think you need to set up Fiscal Year for Oct - Sep

2) The variable should be this?

Sum({<Month = {">=$(=Min(Month)) <= $(=Max(Month)-1)"}>}Sales)


Or use NumberField for them and replace Month to NumberField

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
bharani8
Creator III
Creator III

Few months back.. i have created a Qtr wise in the script itself.. May be this logic will be helpful in urs..

My year is like 201601.. 201602

left(mnthclosetime,4)+ if(right(mnthclosetime,2)>=11,1,0)&'-'& 'Q' & ceil(match(Month(makedate(left(mnthclosetime,4),right(mnthclosetime,2),'01')),'Nov','Dec','Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct')/3) as Year_Subs_Quarter,

effinty2112
Master
Master

Hi Varun,

Try this expression to give the Fin Year:

if (Ceil(Month(Date) / 3)<4,Year(Date)-1 & '/' & Year(Date), Year(Date) & '/' & Text(Year(Date)+1) )

For Date = 01/09/2017 the expression returns 2016/2017.

Regards

Andrew

PS This is probably simpler:

if (Month(Date) <10,Year(Date)-1 & '/' & Year(Date), Year(Date) & '/' & Text(Year(Date)+1) )

tomasz_tru
Specialist
Specialist

Is it possible to use flag on the data model?

Tomasz