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.
Hi ...
I have below measures to greet users who access the dashboard.
Greeting User =
VAR _User = USERNAME()
VAR _Hour = HOUR(NOW())
VAR _Prefix =
SWITCH(
TRUE(),
_Hour < 12, "Good Morning ",
_Hour >= 12 && _Hour < 17, "Good Afternoon ",
"Good Evening "
)
RETURN
CONCATENATE(_Prefix, _User)
However, it shows us the DOMAIN\Username ...
How can I return the value with the user's Full Name or without DOMAIN\ ...
Regards,
NickzNickz
Solved! Go to Solution.
Hi @NickzNickz ,
What a great idea to greet your users!
How about this:
Measure = VAR _User = USERNAME() VAR _Hour = HOUR(NOW()) VAR _Prefix = SWITCH( TRUE(), _Hour < 12, "Good Morning ", _Hour >= 12 && _Hour < 17, "Good Afternoon ", "Good Evening " ) RETURN CONCATENATE(_Prefix, SUBSTITUTE(_User, "DOMAIN\", "") )
Let me know if this helps 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
Also happily accepting Kudos 🙂 |
Feel free to connect with me on LinkedIn! | |
#proudtobeasuperuser | |
Hi @NickzNickz ,
What a great idea to greet your users!
How about this:
Measure = VAR _User = USERNAME() VAR _Hour = HOUR(NOW()) VAR _Prefix = SWITCH( TRUE(), _Hour < 12, "Good Morning ", _Hour >= 12 && _Hour < 17, "Good Afternoon ", "Good Evening " ) RETURN CONCATENATE(_Prefix, SUBSTITUTE(_User, "DOMAIN\", "") )
Let me know if this helps 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
Also happily accepting Kudos 🙂 |
Feel free to connect with me on LinkedIn! | |
#proudtobeasuperuser | |
Hi @tackytechtom ,
I have tested and it shows me the name without the domain name..Greatttt!!!.
I need to replace DOMAIN\ with my domain name ...😅
If I publish it at power bi service, how can I ensure the timezone follows my timezone ...
Really appreciate your help @tackytechtom ...
Regards,
NickzNickz
Hi @NickzNickz ,
You are very welcome! 🙂
This is a classic one. I think now() returns always UTC in the Service. You might need to add some logic to it. Here a thread that might help ypu:
Solved: timezone corrections on power BI service not the s... - Microsoft Power BI Community
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
Also happily accepting Kudos 🙂 |
Feel free to connect with me on LinkedIn! | |
#proudtobeasuperuser | |
Hi @NickzNickz ,
The SUBSTTITUTE function is case sensitive. Is it "DOMAIN\" or "Domain\" or "domain\"?
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
Also happily accepting Kudos 🙂 |
Feel free to connect with me on LinkedIn! | |
#proudtobeasuperuser | |
Hi @NickzNickz
please try
Greeting User =
VAR _User =
PATHITEM ( SUBSTITUTE ( USERNAME (), "/", "|" ), 2 )
VAR _Hour =
HOUR ( NOW () )
VAR _Prefix =
SWITCH (
TRUE (),
_Hour < 12, "Good Morning ",
_Hour >= 12
&& _Hour < 17, "Good Afternoon ",
"Good Evening "
)
RETURN
CONCATENATE ( _Prefix, _User )
Just noticed the mistake. I used "/" instead of "\" 😅
Greeting User =
VAR _User =
PATHITEM ( SUBSTITUTE ( USERNAME (), "\", "|" ), 2 )
VAR _Hour =
HOUR ( NOW () )
VAR _Prefix =
SWITCH (
TRUE (),
_Hour < 12, "Good Morning ",
_Hour >= 12
&& _Hour < 17, "Good Afternoon ",
"Good Evening "
)
RETURN
CONCATENATE ( _Prefix, _User )
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |