Forum Discussion
Anonymous
6 years agoNot applicable
Dynamic MAX for all rows
I have a table that looks like this: H1 H2 H3 H4 H5 # Layers John Smith 1 John Smith Mary Jane 2 John Smith Mary Jane Andrew Johnson 3 John Smith...
Anonymous
6 years agoNot applicable
DataInsights There is one slicer for each column. Depending on who the user is, they are going to filter on H1, or H2, etc. So if I'm Andrew, for example, I'm gonna use the H3 slicer because my name is in the 3rd hierarchy
DataInsights
Super User
6 years agoAnonymous, try this measure:
Max Layer H3 =
VAR vSelName =
SELECTEDVALUE ( Layers[H3] )
VAR vMaxLayer =
CALCULATE ( MAX ( Layers[# Layers] ), ALL ( Layers ), Layers[H3] = vSelName )
RETURN
vMaxLayer
You can replicate this logic for each column's slicer (H1, H2, etc.).
- Anonymous6 years agoNot applicable
DataInsights I need the max to be just one column, not 5 different ones 😕
- DataInsights6 years ago
Super User
Anonymous, revised measure:
Max Layer = CALCULATE ( MAX ( Layers[# Layers] ), ALLSELECTED ( Layers ) )