Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
drexelbit
Contributor
Contributor

variables in expression editor

I have a table object, I can't get the variable to work for filtering, this is what I want to use the variable KPI_Type:

=if([Q_KPI_Type] = KPI_Type, [Quarterly_KPI])

it is not showing anything.  but if I hard code like below,  the result is showing the correct data set

=if([Q_KPI_Type] = 'Internal', [Quarterly_KPI])

the variable displays Internal (or external) values correctly by testing with a text object.  both the Q_KPI_Type and  Quarterly_KPI are column field names.  what am I doing wrong?  thank you

 

Labels (3)
4 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

My guess is that there is more than one KPI_Type value?  Have you tried selecting a single value in KPI_Type?

-Rob

drexelbit
Contributor
Contributor
Author

not sure what you mean by selecting single value, here is the partial table(2 columns) if it helps.  I want to be able to show the first 6 only when KPI_Type = Internal and show the rest only when KPI_Type = external

Quarterly_KPI                               Q_KPI_Type
Turnover_Rate                              Internal
Open_FTE_Ratio                          Internal
Certification_Ratio                      Internal
Training_Timeliness                   Internal
Audit_Started_Timely               Internal
QA_Results                                     Internal
Audit_Satisfatory_Ratio           External
Repeat_Issue                                External

 

 

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Do you want to show these KPIs as columns in a table? As separate objects?

What do you mean when you say "when" KPI_Type = Internal ? Do you mean the user will select either Internal or External?

-Rob

drexelbit
Contributor
Contributor
Author

No, these KPIs are rows, i have month/quarter as columns to show the trend month by month or quarter by quarter. I want to use the variable as a filter(show as buttons) to be able to show/hide the rows for internal or external.  I know filter pane can do this, but I just want to go with the variable approach.  thank you