The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
In my calendar table I have 2 columns other than my key date field one is to say 'yes' or 'no' depending on if the period has been closed by accounting and the second to show a user friendly display of the fiscal period.
I have tried several formuals but most recently this simple one is providing incorrect data and I am not sure why
@Mmahachi , I need some data to suggest. Try
Last Period Closed =
var _LastClosed = maxx(filter(allselected('Calendar'),'Calendar'[AccountPeriodClosed]="Yes"),[AccountPeriodClosed])
return
CALCULATE(MAX('Calendar'[Fiscal Period Display]), FILTER('Calendar','Calendar'[AccountPeriodClosed] =_LastClosed ))
or
Last Period Closed =
var _LastClosed = maxx(filter(allselected('Calendar'),'Calendar'[AccountPeriodClosed]="Yes"),[AccountPeriodClosed])
return
CALCULATE(MAX('Calendar'[Fiscal Period Display]), FILTER(allselected('Calendar'),'Calendar'[AccountPeriodClosed] =_LastClosed ))
Hi @Mmahachi ,
Try this measure.
Last Period Closed =
VAR LastClosed =
CALCULATE (
MAX ( 'Calendar'[Fiscal Period Display] ),
FILTER (
'Calendar',
'Calendar'[AccountPeriodClosed]
) = "Yes"
)
RETURN
LastClosed
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
57 | |
32 | |
20 | |
17 | |
15 |
User | Count |
---|---|
46 | |
34 | |
30 | |
23 | |
20 |