Filter a column dynamically using a measure in Pow

2019-08-23 01:46发布

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?

1条回答
聊天终结者
2楼-- · 2019-08-23 01:51

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.

查看更多
登录 后发表回答