Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
risabhroy_03
Partner - Creator II
Partner - Creator II

Dynamic Fiscal Year issue

I want to create a KPI in which the fiscal year has to be shown. It should be dynamic which means, the fiscal year should change when I select any year filter.

This is the equation that i wrote in the KPI but the problem is it shows only 2021-2022, when I use the filter for 2010 it remains as 2021-2022 but actually it should be changed to 2010-2011.

 

if((Year(MaxDateProcurement)=Year(Today()) and month(MaxDateProcurement)>=4) or
(Year(MaxDateProcurement)=Year(addyears(Today(),1)) and month(MaxDateProcurement)<=3)

,Year(MaxDateProcurement)&'-'& year(AddYears(MaxDateProcurement,1)))

 

MaxDateProcurement is my max(orderdate)

1 Solution

Accepted Solutions
sasikanth
Master
Master

hi @risabhroy_03 , 

 

try below expression

=concat(DISTINCT  Year(MaxDateProcurement) + If(Month(MaxDateProcurement)>=4, 1, 0)  ,'-')

 

 

Thank, 

Sasi

View solution in original post

5 Replies
bgl-sjoyce
Partner - Contributor III
Partner - Contributor III

You're evaluating MaxDateProcurement with Today().  Filter selections aren't going to impact the today function.

If MaxDateProcurement is associated to your data model correctly, you should just be able to use:  Year(MaxDateProcurement)&'-'& year(AddYears(MaxDateProcurement,1))

sasikanth
Master
Master

hi @risabhroy_03 , 

 

try below expression

=concat(DISTINCT  Year(MaxDateProcurement) + If(Month(MaxDateProcurement)>=4, 1, 0)  ,'-')

 

 

Thank, 

Sasi

risabhroy_03
Partner - Creator II
Partner - Creator II
Author

Hey, I used your expression but it is also not affected by filters.

It is still showing as 2021-2022 even after selecting any year filter.

risabhroy_03
Partner - Creator II
Partner - Creator II
Author

Hey,

It is not working as it shows 1905 as the year

and I want the current fiscal year.

For ex, it should display 2021-2022 and it should be changed with my year filter, like If I select 2022 from my filter it should show 2022-2023, if I select 2006 from my year filter it should show 2006-2007.

sasikanth
Master
Master

@risabhroy_03 , 

check your date format, above solution is working fine for me

 

COMM1.PNGCOMM2.PNG