Search code examples
powerbidaxmeasure

Filter a column dynamically using a measure in Power BI


There is a column with FY i.e. "FY19","FY18","FY17" etc.

I Created a measure which calculates the current FY:

CurrFY =
CONCATENATE (
    "FY",
    IF (
        MONTH ( TODAY () ) <= 3,
        VALUE ( FORMAT ( TODAY (), "YY" ) ),
        VALUE ( FORMAT ( TODAY (), "YY" ) ) + 1
    )
)

e.g. output: "FY19"

Now i need to filter the report based on the FY column using the current FY i get from the CurrFY measure.

How do i do it?


Solution

  • Create a calculated column on your table using that measure

    FYFilter = IF(Table1[FY] = [CurrFY], 1, 0)
    

    Then add that column as a report level filter where FYFilter is 1.