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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
olearych
Regular Visitor

Last Fiscal Period

Hello all,

 

I need to display the last Financial Period (based on today's period) in a card and also in a table. E.g. If today is in Financial Period 12 (2020-21), I need the card to display Period 11 (2020-21).

 

I have a date table including the following columns:

 

Date | Financial Period | First date of Financial Period | Last date of Financial Period |

 

Any help is appreciated. Thanks.

2 REPLIES 2
olearych
Regular Visitor

@Greg_Deckler Thanks for the reply 🙂

 

The first measure works and returns the current period.  The second measure doesn't work as it cannot convert the text column to number.  The Fiscal Period column is a text description.  Below is the Dax.  Is there any way around this without having to change the contents and type of that column?

 

Previous Period =
VAR _current = MAXX(
FILTER( 'Dates', [Date] = TODAY() ),
'Dates'[PeriodYear]
)
VAR _Previous = _current - 1 Return _Previous

Greg_Deckler
Super User
Super User

@olearych Seems like it would be something along the lines of a filter on the card using a measure or column like:

 

Measure Current Period = MAXX(FILTER('Table',[Date]=TODAY()),'Table'[Financial Period])

Measure Last Period = [Measure Current Period] - 1


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors