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
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
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.