Forum Discussion
Filter with dynamic lookup on today()
- 5 years ago
Anonymous , Create a new column like this in your table and select current
if([period] = maxx(filter(Table,[Date]=today()),[period]), "Current", [period])
Anonymous
I think I might know what you are trying to do here. I don't have an elegant solution but this would ultiamtely work to meet the need I think
So I've made some sample data to start with for a dimension table
One thing you could do is first make a column to identify what season today falls into
Today Column =
var TheDay_Today = TODAY()
return
IF(DimTable[Date] = TheDay_Today, DimTable[Season], "")
Which will give you something like this
Next you can make a column to only fill in seasons for when the Season matches the Today Column
Current Season =
var TheMaxSeason_Today = CALCULATE(MAX(DimTable[Today Column]), ALL(DimTable))
return
IF(DimTable[Season] = TheMaxSeason_Today, 1, 0)
That will give you a binary column you can then use to reference as page level filter or within measures
That would allow the page level filtering to work and update as you shift through seasons