Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
My company financial year is from Oct - Sep every year.
Thus, i would like to sort or categorize the date in bar chart accordingly e.g. Oct-2018 ~ Sep-2019 / Oct-2019 ~ Sep-2020.
Table
Bar Chart
Scripting
Is that possible to categorize (Oct-2018 ~ Sep-2019) as 2018/2019 and (Oct-2019 ~ Sep-2020) as 2019/2020?
Hi, you can create a FiscalYear field similar to the following script:
Set vStartMonth = 10; Load Dual(fYear-1 &'/'& fYear, fYear) as FiscalYear, *; Load Year + If(Month>=$(vStartMonth), 1, 0) as fYear, *; LOAD * INLINE [ Year, Month 2018, 8 2018, 9 2018, 10 2018, 11 2018, 12 2019, 1 2019, 2 2019, 3 2019, 4 2019, 5 2019, 6 2019, 7 2019, 8 2019, 9 2019, 10 2019, 11 2019, 12 2020, 1 2020, 2 2020, 3 2020, 4 2020, 5 ];
The new field after reload is as follows
Detailed explanation in the following blog post: https://community.qlik.com/t5/Qlik-Design-Blog/Fiscal-Year/ba-p/1472103