Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Soniya1307
Contributor
Contributor

Introduce a fiscal year filter on the application

What should be the logic/formula to be used to have a fiscal year filter on the application.

Filter is created on the application, now as a next step need to implement formula to calculate the fiscal year from the given date & time formula column. Format of the date in table (Format - 01-04-2023 05:45).

 

Labels (3)
1 Reply
Sayed_Mannan
Creator II
Creator II

Hi please follow these steps:

1. Load Data: Ensure your data is loaded into QlikSense, including the date and time column.

2. Create Fiscal Year Field: Use the YearName function to create a fiscal year field. Since your fiscal year starts in April, you can use the following script in the data load editor:

LOAD
DateField,
YearName(DateField, 0, 4) AS FiscalYear
FROM [YourDataSource];

Replace `DateField` with the actual name of your date and time column.

3. Add Fiscal Year Filter:Go to your sheet and add a filter pane then Select the FiscalYear field you created.

4. Expression for Fiscal Year Calculation: If you need to calculate the fiscal year dynamically in expressions, use the following logic:

IF(Month(DateField) >= 4, Year(DateField) & '-' & Year(DateField) + 1, Year(DateField) - 1 & '-' & Year(DateField)) AS FiscalYear

 

hope this helps.