Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 :
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 !
May be try this
If(Len(Trim(aggr(Only({<UT ={"$(=UserID)"}>} UserName ),UserName))) > 0, Subfield(Osuser(),'\',1)&'('& aggr(Only({<UT ={"$(=UserID)"}>} UserName ),UserName)&')')
Or this
Aggr(Subfield(Osuser(),'\',1)&'('& Only({<UT ={"$(=UserID)"}>} UserName )&')',UserName)
Ps: I can always transform my expression into :
= if(len(aggr(Only({<UT ={"$(=Subfield(Osuser(),'\',1))"}>} UserName ),UserName))=0,null(), Subfield(Osuser(),'\',1)&'('& aggr(Only({<UT ={"$(=Subfield(Osuser(),'\',1))"}>} UserName ),UserName)&')')
and it would work:
I just want to know why It's returning the Me() value with my first expression ?
May be try this
If(Len(Trim(aggr(Only({<UT ={"$(=UserID)"}>} UserName ),UserName))) > 0, Subfield(Osuser(),'\',1)&'('& aggr(Only({<UT ={"$(=UserID)"}>} UserName ),UserName)&')')
Or this
Aggr(Subfield(Osuser(),'\',1)&'('& Only({<UT ={"$(=UserID)"}>} UserName )&')',UserName)
Thanks Sunny, I already used the first expression; and as I told you, I wanted to know why It's returning the Me () ?
although, I'm thinking that in the expression it's clear that I just want to return to UserName where my UT = Me (the subfield thing)
Not sure how your data is, but if there are any null rows USERNAME with the way you data is connected, it will created (ME) for those rows....
Nope;
It's a test I'm performing with this inline table:
load * Inline [
UT,UserName
Me,Omar Ben Salem
Other, Other
];
tht's why I'm confused ..
What if you test with just this
load * Inline [
UT,UserName
Me,Omar Ben Salem
];
I just experienced a very weird behaviour !!!
I havn't closed my Qlik Sense Desktop since 31/11/2017:
When as a filter, I put date(today()) I have 31/11/2017 !!!
When I closed Qlik Sense et reopened it; it changed to 02/11/2017 !!
That's REAAAALLY WEIRD; mto ; any explanation? Are u aware of such a thing??
+: QLIK SENSE is aware that these 2 "31/10/2017" are not the SAME ; since It does not sum them up into one field :
That's something that could affect my whole project !
May be use Today(1)... look here for explanation