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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
ABR002
Helper I
Helper I

Finding Latest Fiscal Date in Column

Hi, so what I need to do is I need to have a card that displays the latest fiscal date in a column. My companies Fiscal Year runs from Jul-Jun:

Calendar DateFiscal Month NoFiscal Year
7/1/202112022
8/1/202122022
9/1/202132022
10/1/202142022
11/1/202152022
12/1/202162022
1/1/202272022
2/1/202282022
3/1/202292022
4/1/2022102022
5/1/2022112022
6/1/2022122022

 

I have a file that shows expenses based on a date, but what I need to somehow extract the date (in a MMMM YYYY format) of the latest one and put it on a card to show "numbers as of" which would be the last date. The problem is that when I use a max function, it automatically goes to December, as it thinks that December 2022 is after January 2022.

Here's an example of my data:

DateExpenseFiscal YearFiscal monthConcatNeed
7/4/2021$45202211/2022Jul-22
12/4/2021$44202266/2022Dec-22
1/4/2022$16202277/2022Jan-22
1/6/2022$11202277/2022Jan-22
2/6/2022$10202288/2022Feb-22
4/5/2022$3320221010/2022Apr-22

And the desired result would be to extract from need and get "April 2022". It just seems like everything I try has a side effect.

1 ACCEPTED SOLUTION
ebeery
Solution Sage
Solution Sage

@ABR002 What have you tried?  What are the side effects?

From my testing, it seems like you could just use MAX(Table[Date]) and set the format string on the measure to MMMM YYYY.

ebeery_0-1628303353809.png

 

View solution in original post

2 REPLIES 2
ebeery
Solution Sage
Solution Sage

@ABR002 What have you tried?  What are the side effects?

From my testing, it seems like you could just use MAX(Table[Date]) and set the format string on the measure to MMMM YYYY.

ebeery_0-1628303353809.png

 

For some reason it always gives me December 2021 when I do that. I can't figure out why. The latest date is July 2021, but it gets more complicated (then I originally mentioned) as the months aren't calendar months, so April 1 might actually be in March.

What I ended up doing is creating a conditional column that sends the fiscal years date back a year if the month is less than or equal to 6, combine the year and month, and then filter that by max.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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