Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

Date Filtering - Fiscal Year

I have the dates aligned to follow the fiscal year, but the data is still showing from last year. July starts our fiscal year, I want the data to populate as we go through the months. So in the photo below everything should be blank except July, until August begins etc.

 

slow_turtle03_0-1658923390299.png

 

1 ACCEPTED SOLUTION

Okay, so you would just need some slight modifications for the year.  Try this please..

 

FYYearNum =

VAR FYStartMonth = 7
VAR CurrentYear = Year ( TB_MDH_DATA_DAILY_MONTHLY[DT] )
VAR CurrentMonth = Month ( TB_MDH_DATA_DAILY_MONTHLY[DT] )
VAR PriorYear = CurrentYear - 1

RETURN
IF ( CurrentMonth >= FYStartMonth, PriorYear, CurrentYear )

 

View solution in original post

8 REPLIES 8
Anonymous
Not applicable

No, it looks like this. 

 

slow_turtle03_0-1658925619266.png

 

Do you have a column in your date table for Fiscal Year?  For example, July 2022 - June 2023 would be 2022.  Then use the fiscal year as the filter.

Anonymous
Not applicable

I don't know how to write this. Do you have an example?

Anonymous
Not applicable

This is what I have for Month:

 

FYMonthNum =

VAR FYStartMonth = 7

//Update the fiscal year starting month above *Use number between 1 to 12

RETURN

IF (

MONTH ( TB_MDH_DATA_DAILY_MONTHLY[DT] ) >= FYStartMonth,

MONTH ( TB_MDH_DATA_DAILY_MONTHLY[DT] )

- ( FYStartMonth - 1 ),

12

+ (

MONTH (TB_MDH_DATA_DAILY_MONTHLY[DT] )

- ( FYStartMonth - 1 )

)

)

Okay, so you would just need some slight modifications for the year.  Try this please..

 

FYYearNum =

VAR FYStartMonth = 7
VAR CurrentYear = Year ( TB_MDH_DATA_DAILY_MONTHLY[DT] )
VAR CurrentMonth = Month ( TB_MDH_DATA_DAILY_MONTHLY[DT] )
VAR PriorYear = CurrentYear - 1

RETURN
IF ( CurrentMonth >= FYStartMonth, PriorYear, CurrentYear )

 

jennratten
Super User
Super User

Hello - I believe this is becuase there is not a filter on the year.  You can modify the dates included in your visual either by using the filters pane, selecting the relevant date range, or you can create measures for time periods such as current year, prior year, etc.

Anonymous
Not applicable

If I filter by year and select 2022, it shows Jan - July. I would like it to start on July. Do I need to filter the column some how?

In the visual pane, for month, click the drop-down menu and choose show items with no data.  Does that work?

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.