Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I want to achieve this function.
I have a user name column, whenever the user logs in to pbi only his name should be filtered and all other things should show up based on his username alone.
How to achieve this?
I have already created these 2 measures
Please help.
Thanks
this is the error I am getting when trying to add a calculated column to c
Solved! Go to Solution.
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
@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 )
)
)
))
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
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
12 | |
11 | |
7 | |
6 |