Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

View all the Fabric Data Days sessions on demand. View schedule

Let a visual title and Axes read displayed hierarchy level with ISINSCOPE.

Tweak ISINSCOPE to function within a Visual Title or the Axes. This would let users dynamically write a Title with something like

TitleText =
"Shipped Orders" &
SWITCH(TRUE()
, ISINSCOPE(Dates[Week]), " by Week Period"
, ISINSCOPE(Dates[Month]), " by Month Period"
, ISINSCOPE(Dates[Quarter]), " by Quarter Period"
, ISINSCOPE(Dates[Year]), " by Year Period"
)


or dynamically set the maximum axis value with something like

AxesMaxVal =

var MaxBarHeight =
SWITCH(TRUE()
, ISINSCOPE(Dates[Week]), MAXX(ALLSELECTED(Dates[Year], Dates[Quarter], Dates[Month], Dates[Week]), [Total Orders])
, ISINSCOPE(Dates[Month]), MAXX(ALLSELECTED(Dates[Year], Dates[Quarter], Dates[Month]), [Total Orders])
, ISINSCOPE(Dates[Quarter]), MAXX(ALLSELECTED(Dates[Year], Dates[Quarter]), [Total Orders])
, ISINSCOPE(Dates[Year]), MAXX(ALLSELECTED(Dates[Year]), [Total Orders])
)

return
CEILING(1.4 * HeightUse, 100)

 

Both of these measures don't work right now because of the ISINSCOPE.

Status: New
Comments
jkbyerlyzclp
New Member
This is exactly what I need. We have many combo charts where sales are on the primary y-axis and budget is shown on the secondary y-axis. When using a date hierarchy on the x-axis, there is no way to sync the max axis values. Tying the max value to a measure that calculates based on the selected hierarchy would solve this problem.