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: 
Not applicable

Text box to show conditional text based on selected dimesion

Hi All,

I need an expression to put in a text box or create a variable using that expression to display text based on selected dimension

Data Model

  • I have a Department Table
  • And a Team Table (Which links to department with DepartmentId as foreign key)
  • NOTE: Some Departments does not have teams

An an Example:

  • Sales Department has 3 Teams (Team1, Team2, Team3 )
  • And Finance Department has NO Teams

  • If Department is selected as 'Sales'
  • Then it should say 'Click here to drill down to team'


  • If Department is selected as 'Finance'
  • Then it should say 'No Teams for this department'
  • Because this department does not have any teams



1 Solution

Accepted Solutions
maxgro
MVP
MVP

try the attachment

1.png

= IF(GetPossibleCount(Team)>0 and GetSelectedCount(Department)=1, 'Click here to drill down to team', 'No Teams for this department / Select 1 department')

View solution in original post

2 Replies
marcus_sommer

Maybe something like this:

if(count(distinct Department) >= 0, 'Click here to drill down to team', 'No Teams for this department')

- Marcus

maxgro
MVP
MVP

try the attachment

1.png

= IF(GetPossibleCount(Team)>0 and GetSelectedCount(Department)=1, 'Click here to drill down to team', 'No Teams for this department / Select 1 department')