Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.
Hi Everyone,
Please let me know whether my requirement is possible in power bi service login using RLS(row level Security)
example: When I log in to the report the left side I would like to display My name with greetings.
Based on login time Greeting should change like Good morning,Good Afternoon,Good Evening
Solved! Go to Solution.
Greeting1 = VAR user = USERNAME() VAR display = LOOKUPVALUE(Table1[User],Table1[Email],user) VAR hour = HOUR(NOW()) VAR minute = MINUTE(NOW()) VAR prefix = SWITCH( TRUE(), hour<12,"Good morning ", hour>=12 && hour<17,"Good afternoon ", "Good evening " ) RETURN CONCATENATE(prefix,display)
Hi
below is how I achieved the Timezone difference, for your reference
How about a measure in a card visual like this:
Greeting = VAR user = USERNAME() VAR hour = HOUR(NOW()) VAR minute = MINUTE(NOW()) VAR prefix = SWITCH( TRUE(), hour<12,"Good morning ", hour<17,"Good afternoon ", "Good evening " ) RETURN CONCATENATE(prefix,user)
Wow! Great @Greg_Deckler.Thank you.
Username() returning sara@xyz.com instead I need the name only .so I'm maintaining one column to store the list of username in each table.
suppose If I have 3tables connected to the report and each table I will be having UsernameList and Email list
how could I pass username list column in the parameter
var User =UsernameList
UsernameList is the filed name in my table
thanks in advance
Greeting1 = VAR user = USERNAME() VAR display = LOOKUPVALUE(Table1[User],Table1[Email],user) VAR hour = HOUR(NOW()) VAR minute = MINUTE(NOW()) VAR prefix = SWITCH( TRUE(), hour<12,"Good morning ", hour>=12 && hour<17,"Good afternoon ", "Good evening " ) RETURN CONCATENATE(prefix,display)
Thanks a lot, it's working fine in desktop but once i publish to service the time is wrongly showing please help me where I'm doing mistake
I published on 7:39pm that is 19:39 instead it's showing 14:06
Have a look at this blog:
http://radacad.com/solving-dax-time-zone-issue-in-power-bi
But, short story is the easiest way will be to just put an offset into your hour calculation to account for your timezone difference between where you are an where Power BI is hosted.
It's not working with Userprincipal for other user.Their name is mapped with correct email id
Hi @shoeb1359
If your Detail[Name] lookup values return the username then try using the USERNAME() function instead of USERPRINCIPALNAME()
Hi
below is how I achieved the Timezone difference, for your reference
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
37 | |
25 | |
21 | |
12 | |
10 |