Forum Discussion
Button behaviour - Page navigation
- 6 years ago
You can also use the nav meausures to set the button formatting to show the buttons disabled if they don't go anywhere.
This is the measure to set the color.
Button background Industry Growth = IF ( ISBLANK ( [Nav Industry Growth] ), "grey","white")Then you assign that as the Field Value for the conditional format of the button background.
Updated file with the button format attached.
I believe you will need the page nav info on the user table, something like this:
Then you can write measures to use as the page navigation based on the USERPRINCIPALNAME() function.
Nav Migrations =
VAR _UPN = USERPRINCIPALNAME()
RETURN
IF (
NOT ISBLANK (
CALCULATE(
COUNTROWS(Users),
Users[User] = _UPN,
Users[Migrations] = "Y"
)
),"Migrations"
)
This measure will return the string "Migrations" if the logged in user has a "Y" in the Migrations column of the users table.
You assign this measure as the page navigation measure on a button and when the user can see that page the button will navigate to the Migration page otherwise it will go nowhere.
I made the 4 measures and assigned them to buttons in my attached sample.
You can test it by going to Modeling > View As and entering one of the user names.
Then ctrl clicking on the buttons to see the behavior.
You can also use the nav meausures to set the button formatting to show the buttons disabled if they don't go anywhere.
This is the measure to set the color.
Button background Industry Growth =
IF ( ISBLANK ( [Nav Industry Growth] ), "grey","white")
Then you assign that as the Field Value for the conditional format of the button background.
Updated file with the button format attached.
- Anonymous6 years agoNot applicable
Awesome, jdbuchanan71 . Works like a charm! Thank you!!