In my PowerBI, the user can filter on fiscal years and fiscal months. In a custom column, I need to capture the fiscal period number of the greatest fiscal month that the user has filtered on. For example, if the user selects fiscal year 2019 and fiscal months April through October, in the custom column I need 201907 (my fiscal year runs April to March, so October is 07). I have tried variations of this
FilteredFP =
CALCULATE(
MAX(Dates[FiscalPeriod])
)
But the result is always all seven fiscal periods (201901, 201902, ...). Thank you for any help you can provide!