Dynamic Fiscal Year Filter

248
0
03-30-2023 06:59 AM
Labels (1)
bsklaohfl
New Contributor III

Hi,

I am in need of a way to display a dynamically changing Fiscal Year data parameter. Each Fiscal Year begins 10/01 and ends the follow year on 09/30. The data would change based on the current Fiscal Year.

I have accomplished this on the Map Viewer using an Arcade expression for symbology, which is attached. Is there a way to translate this using a widget on the Experience Builder? I have tried using the Query SQL Expression Builder but have found it limiting...unless I am using it wrong.

Thanks in advance.

if ($feature["DateTimeInit"] >= Date(2019, 10, 1) && $feature["DateTimeInit"] <= Date(2020, 9, 30)) {
    return 'FY 20';
} else if ($feature["DateTimeInit"] >= Date(2020, 10, 1) && $feature["DateTimeInit"] <= Date(2021, 9, 30)) {
    return 'FY 21';
} else if ($feature["DateTimeInit"] >= Date(2021, 10, 1) && $feature["DateTimeInit"] <= Date(2022, 9, 30)) {
    return 'FY 22';
} else {
    return 'N/A';
}

 

0 Kudos
0 Replies