Forum Discussion
Username() function as a filter
- Anonymous5 years ago
I have edited the main message, can you please check and respond accordingly. All tht I am looking for is to be able to check whether the username() returning value and the column value in my table are matching using a calculated column, so that I can add the TRUE value as a page level filter. Hope you got my situation. amitchandak
Anonymous , both username, and userprincipalname can not be used in the column.
Not you can use Functions like Sumx, Countx etc. If needed use values(Table[ID]) // some root level column you can use force this calculation at a lower level.
Sumx(Values(Table[ID]), <Formula>)
amitchandak thanks for the response, can you please elaborate on how sumx or countx could be used in my case. I am unable to understand
thanks
- amitchandak5 years agoSuper User
Anonymous , you doing all operation with username(), how you want use with column ?
example like
// I have not tested this
Viewing As = VAR _USERNAME =CALCULATE(USERNAME()) RETURN
maxx(values(Table[User]),
RIGHT(
LEFT (
_USERNAME,
SEARCH ( "/", _USERNAME, 1, LEN ( _USERNAME ) )
),
LEN (
LEFT (
_USERNAME,
SEARCH ( "/", _USERNAME, 1, LEN (_USERNAME ) - 16 )
)
)
))- Anonymous5 years agoNot applicable
I have edited the main message, can you please check and respond accordingly. All tht I am looking for is to be able to check whether the username() returning value and the column value in my table are matching using a calculated column, so that I can add the TRUE value as a page level filter. Hope you got my situation. amitchandak