Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save $300 before February 6: REGISTER NOW!
cancel
Showing results for 
Search instead for 
Did you mean: 
Husky_Bab12
Contributor
Contributor

Dimension group

Hi, 

I'm trying to activate a variable when the field is not matching with region, code,s.code.

The QlikView version of the expression uses getcurrentfield() with a group like below,

=if(not(match(GetCurrentField(GROUP_2),'REGION', 'CODE', 'S_CODE')),
round($(eNewTT))
)

I need to do the same in the qliksense in a text object,

=if(not(match($Field,'REGION', 'CODE', 'SCODE')),
round($(eNewTT))
)

But with the above I'm not seeing any output no matter which field is selected? 







Labels (1)
1 Solution

Accepted Solutions
Andrei_Cusnir
Specialist
Specialist

Hello,

 

Searching a bit in the community you can find the post: "Getcurrentfield() equivalent in Qlik sense" [1]. It appears that the closest you can get is the use of function  GetFieldSelections().

 

Perhaps you can use a similar approach to this example:

 

1. I have a dataset:

 

2. Then I have used the expression: =If(Match(GetFieldSelections(GROUP_2),'REGION', 'CODE', 'S_CODE'), 'Match', 'Not Match')

 

3. The outcome if you don't select a value

 

4. The outcome if you select one value:

 

5. The outcome if you select multiple values:

 

 

I hope that this information was helpful. In case I have misunderstood the use case scenario, please elaborate in details by providing additional information. However, if it has helped you resolve the issue, addressed your concerns or at least pointed you in the right direction, please mark it as Accepted Solution to give further visibility to other community members. 
 

---

[1] https://community.qlik.com/t5/New-to-Qlik-Sense/Getcurrentfield-equivalent-in-Qlik-sense/td-p/107801...

 

Help users find answers! Don't forget to mark a solution that worked for you! 🙂

View solution in original post

3 Replies
Andrei_Cusnir
Specialist
Specialist

Hello,

 

Searching a bit in the community you can find the post: "Getcurrentfield() equivalent in Qlik sense" [1]. It appears that the closest you can get is the use of function  GetFieldSelections().

 

Perhaps you can use a similar approach to this example:

 

1. I have a dataset:

 

2. Then I have used the expression: =If(Match(GetFieldSelections(GROUP_2),'REGION', 'CODE', 'S_CODE'), 'Match', 'Not Match')

 

3. The outcome if you don't select a value

 

4. The outcome if you select one value:

 

5. The outcome if you select multiple values:

 

 

I hope that this information was helpful. In case I have misunderstood the use case scenario, please elaborate in details by providing additional information. However, if it has helped you resolve the issue, addressed your concerns or at least pointed you in the right direction, please mark it as Accepted Solution to give further visibility to other community members. 
 

---

[1] https://community.qlik.com/t5/New-to-Qlik-Sense/Getcurrentfield-equivalent-in-Qlik-sense/td-p/107801...

 

Help users find answers! Don't forget to mark a solution that worked for you! 🙂
Husky_Bab12
Contributor
Contributor
Author

Thank you for the detailed explanation. But the expression throws an error.

Husky_Bab12_0-1662727266783.png

 

Andrei_Cusnir
Specialist
Specialist

I think there my be an issue with the expression, can you please copy and paste here the full expression that you are using?

Help users find answers! Don't forget to mark a solution that worked for you! 🙂