Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
hammermill21
Creator III
Creator III

GetFieldSelections question

Hello!

I am creating a variable for when a building is selected. My expression for my building filter is: 

=Trim(Upper(Replace(building, '_', ' '))) & Trim(Upper(Replace(enter_building, '_', ' '))), now I"m trying to create a variable for GetFieldSelctions using my building expression but it doesn't work. 

Any ideas?

 

Thank you!

22 Replies
hammermill21
Creator III
Creator III
Author

No that doesn't work 😞

It says I'm missing ")", I add it then it gives me an error in expression if takes 2-3 parameters.

 

Thanks for your help with all of this!

sunny_talwar

My bad, try this

Len(Trim(
  Concat(DISTINCT
    Trim(Upper(Replace(building, '_', ' '))) &
    Trim(Upper(Replace(enter_building, '_', ' ')))
)) > 0
hammermill21
Creator III
Creator III
Author

Still not working, I feel like this shouldn't be so hard LOL

sunny_talwar

I think I am still missing a parenthesis... try this

Len(
  Trim(
    Concat(DISTINCT
      Trim(Upper(Replace(building, '_', ' '))) &
      Trim(Upper(Replace(enter_building, '_', ' ')))
    )
  )
) > 0
hammermill21
Creator III
Creator III
Author

Still not working, I've attached the file to see if it's maybe something else I've done wrong? 

 

 

sunny_talwar

Where exactly are you trying to do this in your dashboard?

hammermill21
Creator III
Creator III
Author

In the "Select Building" KPI.

sunny_talwar

I am confused... what exactly are you trying to do? Are you only looking to show something when one building is selected? what happens when nothing is selected or when more than one building is selected?

hammermill21
Creator III
Creator III
Author

I need to just show when one building is selected. When no building is selected it will say "All buildings are reflected in the data below unless a building filter is selected".

sunny_talwar

Try this

If(GetSelectedCount(building) = 1, Concat(DISTINCT
    Trim(Upper(Replace(building, '_', ' '))) &
    Trim(Upper(Replace(enter_building, '_', ' ')))
), 'All buildings are reflected in the data below unless a building filter is selected')