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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Ros-ec
Helper I
Helper I

Wanting to find the current period with the highest number in the financial year - Power BI

I have a dataset in power BI that has the period, year, client identifier and debtors balance over a period of years for multiple clients.

I'm wanting to find out the current year and the latest period. For example, in the financial year starting in April 2022, in August of that year it will be 2023 for the current year and period 5 for the current month. I then want to use this information to calculate further fields.

I have created a measure to calculate the max on the year (the current year) which returns 2023, called 'Fees Balances'[Current Year]

I then wanted to use that to find the max period (the current period) on the periods with the year 2023, therefore I set up a measure:

Current Period = calculate(max('Fees Balances'[Period]),'Fees Balances'[Year]='Fees Balances'[Current Year])

but it's giving me the error message, "A function 'PLACEHOLDER' has been used in a True/False expression that is used as a table filter expression. This is not allowed."

If I swapped in 2023 manually:

Current Period = calculate(max('Fees Balances'[Period]),'Fees Balances'[Year]=2023)

It worked, but the year will change, so wanted it to calculate it dynamically.

Thank you for your help

Best wishes

Ros

 

1 ACCEPTED SOLUTION

Thank you. I sorted it by bringing in a dates table only.

View solution in original post

2 REPLIES 2
grantsamborn
Solution Sage
Solution Sage

Thank you. I sorted it by bringing in a dates table only.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.