Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
OmarBenSalem

Compare variable value to field value ..?

Hi all, stalwar1

I have a variable defined as follow:

UserID:  =subfield(osuser(),'\',1)  : since I'm using the desktop; its value is : Me

I have a table containing all user Ids and their names:

example:

Load * inline [

UT, UserName

Me, Omar Ben Salem   

Other, other user

];


What I want is to update my variable from Me to Me (Omar Ben Salem) : which is

:Subfield(Osuser(),'\',1)&' ('& UserName of UT = Subfield(Osuser(),'\',1) &')'


What I did is this:

=Subfield(Osuser(),'\',1)&'('& aggr(Only({<UT ={"$(=UserID)"}>} UserName ),UserName)&')'


It partially works but it returns :

Capture.PNG


Why it's returing the Me() thing? I just want it to return Me (Omar Ben Salem)


Hope the explanation of my problem is clearer than the thread's title

Thanks !


12 Replies
sunny_talwar

May be you date is a timestamp? and you need to use Floor()

Date(Floor(DateField)) as DateField

sunny_talwar

Did we resolve the UserID issue yet?

OmarBenSalem
Author

As I told you; I already has resolved it; I mean I can show only Me (Omar Ben Salem) but wanted to know why there is the Me () line.

I'll close the thread though