Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.