cancel
Showing results for
Did you mean:

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a \$100 discount. Register Now

Resolver I

## Fiscal Year Filter

Hi All,

I Requirement is,

I have a filter of fiscal year, if the user selects a year from the filter my data should display the value as selected year and below the year. For example, if FY22 is selected, it means my date range will show a value of 2022 and below from 2022 like 2021, 2020, 2019 until the min of the year.

2 ACCEPTED SOLUTIONS
Resolver I

How can I achieve this for the fiscal year?

Thanks,

Community Support

Hi  @Shreeram04 ,

Do you mean FY22 when you say fiscal year?

Here are the steps you can follow：

1. Create calculated column.

``Year = YEAR('Table'[Date])``
``````FY Year =
"FY" &""&RIGHT('Table'[Year],2)``````

2. Create calculated table.

``````Year =
DISTINCT('Table'[FY Year])``````

3. Create measure.

``````Flag =
var _select=
SELECTEDVALUE('Year'[FY Year])
var _year=MAXX(FILTER(ALL('Table'),'Table'[FY Year]=_select),[Year])
return
IF(
MAX('Table'[Year]) <=_year,1,0)``````

4. Place [Flag]in Filters, set is=1, apply filter.

5. Result:

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

5 REPLIES 5
Community Support

Hi  @Shreeram04 ,

Do you mean FY22 when you say fiscal year?

Here are the steps you can follow：

1. Create calculated column.

``Year = YEAR('Table'[Date])``
``````FY Year =
"FY" &""&RIGHT('Table'[Year],2)``````

2. Create calculated table.

``````Year =
DISTINCT('Table'[FY Year])``````

3. Create measure.

``````Flag =
var _select=
SELECTEDVALUE('Year'[FY Year])
var _year=MAXX(FILTER(ALL('Table'),'Table'[FY Year]=_select),[Year])
return
IF(
MAX('Table'[Year]) <=_year,1,0)``````

4. Place [Flag]in Filters, set is=1, apply filter.

5. Result:

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Community Support

Hi  @Shreeram04 ,

I created some data:

Here are the steps you can follow：

1. Create calculated column.

2. Create calculated table.

``````Year =
DISTINCT('Table'[Year])``````

3. Create measure.

``````Flag =
var _select=
SELECTEDVALUE('Year'[Year])
return
IF(
MAX('Table'[Year]) <=_select,1,0)``````

4. Place [Flag]in Filters, set is=1, apply filter.

5. Result:

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Resolver I

How can I achieve this for the fiscal year?

Thanks,

Super User

@Shreeram04 , if select one year and want to show more than that, then you slicer need to on independent date table

//Date1 is independent Date table, Date is joined with Table
new measure =
var _max = maxx(allselected(Date1),Date1[FY])
var _min = _max -5
return
calculate( sum(Table[Value]), filter('Date', 'Date'[FY] >=_min && 'Date'[FY] <=_max))

Need of an Independent Table in Power BI - Exclude: https://youtu.be/lOEW-YUrAbE

Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s

Resolver I

Hi @amitchandak ,

Thanks for your reply, Actually my requirement is in the year filter user selects any year, I want to show the value as the user selected year and below the selected years.

For example, if the user selects 2019 in the year filter means, my table visuals show value as 2019 and below 2019 like 2018,2017..till the min of the year

My table value in the power bi visuals should show as

 Value Year A 2015 b 2016 c 2018 d 2019 e 2017

Thanks,

Announcements

#### Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

#### Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

#### Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

#### Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors