Forum Discussion
Set Page title based upon Page Filter
- 5 years ago
Hi mvgust - sorry I didn't check my code. Try this
Pg Title = var __FromDt = FORMAT( MINX( ALLSELECTED( DateTab[Date] ), DateTab[Date] ), "MMM DD, YYYY") var __ToDt = FORMAT( MAXX( ALLSELECTED( DateTab[Date] ), DateTab[Date] ), "MMM DD, YYYY") RETURN "Report from " & __FromDt & " to " & __ToDtPage (and report filters for that matter) should be able to be accessed like any other type of filter.
Hope this helps
David
Hi mvgust - by page "Title", do you mean the page name, or a title that appears at the top of the page?
If the former, I don't think that can be done.
If the latter, create a measure along the lines of
Pg Title =
var __FromDt = FORMAT( MIN( ALLSELECTED( DateTab[Week End Date] ) ), "MMMM DD, YYYY")
var __ToDt = FORMAT( MAX( ALLSELECTED( DateTab[Week End Date] ) ), "MMMM DD, YYYY")
RETURN
"Report from " & __FromDt & " to " & __ToDt
Put that in a card visual and position it where it needs to go.
Hope this helps
David
- mvgust5 years ago
Helper III
That doesn't seem to work:
"The MIN function only accepts a column reference as an argument"
Also, I'm not using a slicer, I'm using the page filter functionality. I know you can pass slicer selections but my primary issue is passing PAGE filters. I'm not finding a formula to do so?
- dedelman_clng5 years ago
Community Champion
Hi mvgust - sorry I didn't check my code. Try this
Pg Title = var __FromDt = FORMAT( MINX( ALLSELECTED( DateTab[Date] ), DateTab[Date] ), "MMM DD, YYYY") var __ToDt = FORMAT( MAXX( ALLSELECTED( DateTab[Date] ), DateTab[Date] ), "MMM DD, YYYY") RETURN "Report from " & __FromDt & " to " & __ToDtPage (and report filters for that matter) should be able to be accessed like any other type of filter.
Hope this helps
David
- mvgust5 years ago
Helper III
Thanks David! I was able to implement successfully. This also helps with my general knowledge knowing ALLSELECTED will allow me to use those page filters elsewhere.