Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi all,
I'm looking to do a page level filter to only show values for my time period lets call it "Winter", I have linked a dimensions table with every date in the year and what period they fall into, so I would like to be able to say if we're currently in the winter period then show me all values filtered by winter, and if today() equals summer then show all values on summer.
I created a lookup formula within a measure where CurrentPeriod = LOOKUPVALUE(DimDate[Period],DimDate[Date],Today()) but I cant drag that over to the page level filters and when dragged over to the visual level filters, I'm not sure how to set the filter to be dynamic?
Thanks
Solved! Go to Solution.
@JDro , Create a new column like this in your table and select current
if([period] = maxx(filter(Table,[Date]=today()),[period]), "Current", [period])
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
@JDro , Create a new column like this in your table and select current
if([period] = maxx(filter(Table,[Date]=today()),[period]), "Current", [period])
Thank you! This worked perfectly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
117 | |
107 | |
69 | |
68 | |
43 |
User | Count |
---|---|
148 | |
103 | |
103 | |
88 | |
66 |