Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
Can anyone please help me with below?
I have a data set
User Year Flag
AAA 2025 -
AAA 2024 Y
AAA 2023 Y
On the SHEET i have a condition to show only if Flag='Y' .
But that SHEET should also appear to user AAA when Year 2025 is selected where Flag is null (because he had Flag = 'Y' in prior years - sheet should show regardless of selected Year if he ever had Flag Y)
Can anyone please help with the condition to use on the sheet for above scenario?
Thanks in Advance
Hi @Qlikuser225 ,
The cleanest solution is to create a new flag in your script. This new flag will take the value "1" if the user has a row where Flag = Y, regardless of the year, otherwise "0".
To do it, you can create a mapping table like this :
And you will have the following result :
Then, you just need to write this in your set analysis : {< Flag_Y = {1} >}
Hi @Qlikuser225
Try this
IF(
(OSUser() = 'UserDirectory=Dir; UserId=jandre.killian' and GetFieldSelections(Year) = '2025') or (GetFieldSelections(Flag) = 'Y')
, 1
, 0)
Just checking, You can use the OSUser() to get the current user, Is the User is just a field on your side you can just change the expression to
IF(
(User = 'AAA' and GetFieldSelections(Year) = '2025') or (GetFieldSelections(Flag) = 'Y')
, 1
, 0)
You might need to add the Isnull(Flag) is you have more data where the Flag field is null.
Regards
Mark the solution as accepted that solved your problem and if you found it useful, press the like button! Check out my YouTube Channel | Follow me on LinkedIn
Hi @Qlikuser225 ,
The cleanest solution is to create a new flag in your script. This new flag will take the value "1" if the user has a row where Flag = Y, regardless of the year, otherwise "0".
To do it, you can create a mapping table like this :
And you will have the following result :
Then, you just need to write this in your set analysis : {< Flag_Y = {1} >}