In PowerBI DAX, trying to capture greatest fiscal month user has filtered on

54 Views Asked by At

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!

0

There are 0 best solutions below