Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

md_anasabbasi
New Contributor

Getcurrentfield() equivalent in Qlik sense

I'm trying to convert an app in qlik sense from qlik view.

There I encountered with a variable in which '=getcurrentfield(Time)' as expression was present.

But when I tried to make a variable in Qlik sense I couldnt find the getcurrentfield() function in qlik Sense.

What should I do now? Is there any function or expression which can work in the same way as the above mentioned one?

Thanks & regards,

Anas Abbasi !

15 Replies
MVP
MVP

Re: Getcurrentfield() equivalent in Qlik sense

I don't think Qlik Sense thus far has allows you to create groups and this particular function is related to Cycle or Drill Down Groups.

simondachstr
Valued Contributor III

Re: Getcurrentfield() equivalent in Qlik sense

Qlik Sense allows you to create Drill Down groups, however they can not be referenced in a way that is possible in QlikView.

MVP
MVP

Re: Getcurrentfield() equivalent in Qlik sense

Must be a new thing. Apologies for misguiding

anjali0108
Contributor II

Re: Getcurrentfield() equivalent in Qlik sense

Hi Anas,

Here are some of the script and chart functions of Qlikview that are not supported by Qliksense :

GetCurrentField  l  GetExtendedProperty  l  Input  l  InputAvg  l  InputSum etc.


GetCurrentField is one of them .

You can use GetFieldSelections(Time) for the creating the variable in Qliksense.

Syntax: GetFieldSelections ( field_name [, value_sep [, max_values]]) Return data type: string

Examples Results:

Given that John is selected in First name. GetFieldSelections ([First name]) results John.

Hope it helps

Not applicable

Re: Getcurrentfield() equivalent in Qlik sense

You could try a potentially long IF statement, making use of GETSELECTEDCOUNT

e.g. you have a Drill Down with three dimensions: Dim1 > Dim2 > Dim3

GETCURRENTFIELD(<DrillDown>) could be written as:

IF(GETSELECTEDCOUNT([Dim1])=1 AND GETSELECTEDCOUNT([Dim2])=1 AND GETSELECTEDCOUNT([Dim3])=1,'Dim3',

     IF(GETSELECTEDCOUNT([Dim1])=1 AND GETSELECTEDCOUNT([Dim2])=1,'Dim2','Dim1'))

Not applicable

Re: Getcurrentfield() equivalent in Qlik sense

oops - my mistake:

IF(GETSELECTEDCOUNT([Dim1])=1 AND GETSELECTEDCOUNT([Dim2])=1,'Dim3',

     IF(GETSELECTEDCOUNT([Dim1])=1,'Dim2','Dim1'))

simondachstr
Valued Contributor III

Re: Getcurrentfield() equivalent in Qlik sense

This works fine if the user actually drill-down through the group selecting each dimension one by one. However, the drill-down group switches when there is only one possible value in the parent dimension. This does not necessary have to be a selection, but could also be an implicit selection.

e.g. if I select London, the only possible Country will be UK and therefore the drill-down dimension goes to City Level.

Not applicable

Re: Getcurrentfield() equivalent in Qlik sense

hmmm - perhaps use COUNT([Dim1]) instead...

IF(COUNT([Dim1])<=1 AND COUNT([Dim2])<=1,'Dim3',

     IF(COUNT([Dim1])<=1,'Dim2','Dim1'))

reddys310
Honored Contributor II

Re: Getcurrentfield() equivalent in Qlik sense

Did you try out the alternative dimensions property in Qliksense. This could be used like cyclic groups in Qlikview