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: 
mhmmd_srf
Creator II
Creator II

Default Year in Qlikview

Hi,

I have a chart where we are showing Sales by Region. We have a filter on Year and Month.

We need to make it as default selection as Current Year and Current Month.

In Date table we have two flag called Current Year Flag and Current Month Flag. If Flag value is 1, then it shows Current Year and Current Month.

How can we implement this.

We cant use max Year or max Month, as Date table has date till 2036 year.

Please suggest.

Thanks,

Sarif

15 Replies
mhmmd_srf
Creator II
Creator II
Author

Hi Shiva,

In this case we will get data on Calendar Year basis. But we need to show on Fiscal year Basis.

Please help.

Thanks,

Sarif

Anonymous
Not applicable

So for example if your fiscal year is from 1st july to 31st of june, you can select in year field like if(Month(Today())>=7, year(Today())+1,Year(today())). just the same method you used to create the fiscal year field from the date field in your calender.

Hope it helps!

mhmmd_srf
Creator II
Creator II
Author

okk.. got it Shiva..

But if I put simple CurrentYearfLag =1 , then also it is not behaving as expected.

Am I doing correct?

Please help.

Thanks,

Sarif

marioglasmv
Partner - Contributor III
Partner - Contributor III

Try the following:

sum({<Year =, CurrentYearFlag= {1}>}Sales)


Anonymous
Not applicable

hi,

as data tables has dates till 2036, you can use =Date(Max(DSTDTE), 'MMM-YYYY') to display the greatest value from the data.

or =Date(Today(),'MMM-YYYY') for current values.

happy Qliking.

Anonymous
Not applicable

Mohammad, If the date table is like current year when flag =1 , why is that 2016 and 2017 are available in Current year filter and 2017 is fiscal year?? I think they should be reverse i guess.