Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

sspawar88
Contributor

GetCurrentField() in Qlik sense ?

Hi Community,

Have any updates on GetCurrentField() in Qlik sense?

i'm using Drilled Down group as name 'GR' which is working in Qlikview but not in Qlik sense.

Count({<param_name={'TEMP'}, param_value={'<=-1'}>} param_value)

/Aggr(Nodistinct count({<param_name={'TEMP'}, param_value={'<=-1'}>}param_value),$(=GetCurrentField(GR)))

Can anybody give Workaround solution for above Expression?

GR is drilled down group of branch_name, branch_type , loc_type and loc_code

1 Reply
Employee
Employee

Re: GetCurrentField() in Qlik sense ?

Hi Satish,

It'd be great to have GetCurrentField function in Qlik Sense, unfortunately it's still not available.

Let me know what you think about this workaround using GetSelectedCount, which is supported in Qlik Sense. In my app I've created a drill-down group with the following time dimensions:

  • Year
  • Quarter
  • MonthName
  • Date

So, first of all, create a variable with the fields included in your drill-down group as follows:

vGetCurrentTimeFields = if(getselectedcount(Year)=0,'Year',

   if(getselectedcount(Year)=1 and getselectedcount(Quarter)=0,'Quarter',

      if(getselectedcount(Quarter)=1 and getselectedcount(MonthName)=0,'MonthYear',

        if(getselectedcount(MonthName)=1 and getselectedcount(Date)=0,'Day',

           if(getselectedcount(Date)=1, 'Day')))))

2015-10-01 16_10_02-Qlik Academy Dev - QA Teachers and Sessions _ Sheets - Qlik Sense.png

I know what you might be thinking... field names are hardcoded. Yes, but with this simple logic you can retrieve the current field name within a drill down group!! Look at the following pictures. I created a bar chart in which the title is dynamic:

1.png

2.png

3.png

Hope this was helpful!

Alvaro P.