Skip to main content
cancel
Showing results for 
Search instead 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

Reply
Shreeram04
Resolver I
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.

 

Please help to identify a solution for this one.

 

Thanks in Advance.

2 ACCEPTED SOLUTIONS

Hi @v-yangliu-msft 

 

Thanks for your reply it works perfectly for me.

 

How can I achieve this for the fiscal year?

 

Thanks,

 

View solution in original post

v-yangliu-msft
Community Support
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])

vyangliumsft_0-1671442460300.png

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.

vyangliumsft_1-1671442460300.png

5. Result:

vyangliumsft_2-1671442460304.png

 

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

View solution in original post

5 REPLIES 5
v-yangliu-msft
Community Support
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])

vyangliumsft_0-1671442460300.png

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.

vyangliumsft_1-1671442460300.png

5. Result:

vyangliumsft_2-1671442460304.png

 

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

v-yangliu-msft
Community Support
Community Support

Hi  @Shreeram04 ,

I created some data:

vyangliumsft_0-1671429988264.png

Here are the steps you can follow:

1. Create calculated column.

vyangliumsft_1-1671429988265.png

2. Create calculated table.

Year =
DISTINCT('Table'[Year])

vyangliumsft_2-1671429988267.png

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.

vyangliumsft_3-1671429988267.png

5. Result:

vyangliumsft_4-1671429988270.png

 

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

Hi @v-yangliu-msft 

 

Thanks for your reply it works perfectly for me.

 

How can I achieve this for the fiscal year?

 

Thanks,

 

amitchandak
Super User
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

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

Shreeram04_0-1671428458261.png

My table value in the power bi visuals should show as

 

ValueYear
A2015
b2016
c2018
d2019
e2017

 

Thanks,

 

Helpful resources

Announcements
Fabric Community Conference

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.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

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