Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
sudhir0538
Creator
Creator

Fiscal Month Year Displaying in List Box

Hello Techies! Morning greetings.

I have a list box with month year values from database table. Instead of all the items I want to display only the financial period for the selected year.

if user select 2017 the list box (which contains month and year) should display from Apr-2017 to Mar-2018(if available else upto current month) instead of from Jan-2017 to current month.

Please help to achieve this.

Image 1: Normally displaying like this

1.JPG

Image 2: Desired Outcome if 2017 year selected

1.JPG

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Create FiscalYear field in the script, like:

Year(YearStart(DateField,0,4))  as  FiscalYear

View solution in original post

4 Replies
tresesco
MVP
MVP

Create FiscalYear field in the script, like:

Year(YearStart(DateField,0,4))  as  FiscalYear

sudhir0538
Creator
Creator
Author

Hai Treseso , This solution works fine. Thnx for the help.

How can i achieve the same if there's no provision for user to select the year. Like in the chart i want to display only the current fiscal year data.

1.JPG

like in this above pivot table i want to display on the current fiscal year data without selecting the fiscal year from fiscal_year list box.

tresesco
MVP
MVP

You can use set analysis in aggregation function you use as expression.

Sum({<FiscalYear={'$(=Max(FiscalYear))'}>} Sales)

sudhir0538
Creator
Creator
Author

great bro,it's working!!