Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
helen_pip
Creator III
Creator III

Variable which controls the functionality of an expression

Dear Qlikview User

I have found a technqiue via another post where the functionality of an expression is controlled through a variable

However I would now like to add other functions to this technique, but am unsure on how to do so

Could someone kindly take a look at the attached document and kindly help me as to how I could get it to work with 95th Centile, using the fractile function

Kind Regards

Helen

1 Solution

Accepted Solutions
sunny_talwar

May be using this expression:

=$(=v_expression&'('&'data'& If(v_expression = 'Fractile', ', 0.95') & ')')


Capture.PNG

View solution in original post

4 Replies
sunny_talwar

May be using this expression:

=$(=v_expression&'('&'data'& If(v_expression = 'Fractile', ', 0.95') & ')')


Capture.PNG

helen_pip
Creator III
Creator III
Author

Thanks Sunny

Perfect! This works for me

Thanks

Helen

helen_pip
Creator III
Creator III
Author

Hello SunnyT

I was wondering if you could kindly help me amend the expression for this post from earlier today

I would like to add another button which counts the ID when a wait is over 4 hours

How would I incorporate the following expression so that a button can activate the equation

=Count(If(ED_Total_Wait>240,ED_ID))

I have tried the following, but it it erroring, perhaps I am asking too much of the technique

=$(=v_expression&'('& v_data &

If(v_expression = 'Fractile', ', 0.95')

&

If(v_expression = 'Count', ', If(ED_Total_Wait>240,ED_ID))'

')')

Are you able to help

Kind Regards

Helen

sunny_talwar

Not sure what ED_Total_wait and ED_ID correspond to in the sample above, but may be this:

=$(=If(v_expression = 'count', v_expression &'(If(ED_Total_Wait > 240, ED_ID))',

  v_expression & '(' & 'data' & If(v_expression = 'Fractile', ', 0.95') & ')'))

Corresponding expression for your sample:

=$(=If(v_expression = 'count', v_expression &'(If(data > 240, dimension))',

  v_expression & '(' & 'data' & If(v_expression = 'Fractile', ', 0.95') & ')'))

Capture.PNG