Forum Discussion
samkamal230
3 years agoRegular Visitor
DAX Measure for Showing pages for certain users
Hi Everyone! I have the following case scenario. I have created a report with several pages (all are hidden except the landing page). The users navigate to other pages via buttons. There are some ...
samkamal230
3 years agoRegular Visitor
I have created the following measure, but am unable to navigate to the hidden page "Drill on ABC".
Measure =
IF (
CONTAINS (
'User Table',
'User Table'[Username],
USERNAME()
) && (
CONTAINS (
'User Table',
'User Table'[Job Title],
"Manager"
) || CONTAINS (
'User Table',
'User Table'[Job Title],
"Director"
)
),
SWITCH ( TRUE(), TRUE(), [Drill on ABC] ),
BLANK()
)
Note: CONTAINSSTRING is not working in this scenario. Also, in the SWITCH statement, it is giving the following error: "Drill on ABC" cannot be determined. Either a column doesn't exist or there is no current row for this column.
- mlsx43 years agoMemorable Member
I used this formulas:
Active user = LOOKUPVALUE( User[Page Id], User[email], USERNAME() )Control User = VAR __tablaAux = FILTER( User, User[email] = USERNAME() ) VAR __banderaRol = CONTAINS(__tablaAux, User[Page Id], 2) Return IF( __banderaRol , "Page1", "Page forbidden" )Anyway, you must be aware that this kind of trick is not really safe. User could easily find the "hidden" pages.