Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Save an extra $150 Dec 1–7 with code CYBERWEEK - stackable with early bird savings: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Slider object to show students above certain value

Hi,

I have a straight table, which I would only like to show students that have a risk % greater than the value set in the slider object.

I have tried to achieve this by setting this on the Presentation tab, under the conditional show/hide expression, BUT it isn't really working.

Any ideas?

Thanks

1 Solution

Accepted Solutions
ToniKautto
Employee
Employee

You should look into eliminating the syntethic key in your data model, since this is likely to cause problems in the long run with your calculations.

Please notice that you have altered the Conditional show for the fields and not for the rows. This means that when the condition you have set up is equal to True, then the field will be show else it will be hidden.

The quick fix is to set the conditional show to always show, so that you don't accidentally hide a column in your table. Then you can add a IF statement in your  expression, meaning that if your calculation is below the vRiskRnage variable then the calculation shoudl be executed. Note that when the value is above the variable the IF will set the field value to Null, which will not be presented since you have Suppress Zero Values enabled for the table object.

Keep in mind that this type of double calculation can get heavy if you app has a lot of data and the caluculation is complex. Therefore it is recommended to do as much calculation as possible in the load script to minimize the impact runtime performance.

=if( (

          (SUM(AttendanceFlag)/count( {$<System = {'Lecturers'}>} [Activity Date] )  * 0.30 +

          (SUM(AssignmentFlag)/

          count( {$<System = {'Assignments'}>} [Activity Date] ) ) * 0.40 +

          count( {$<LoginFlag = {0}>} [Activity Date] )/

          count( {$<System = {'Network login'}>} [Activity Date] ) * 0.30)

      ) < $(vRiskRange),

          (SUM(AttendanceFlag)/count( {$<System = {'Lecturers'}>} [Activity Date] )  * 0.30 +

          (SUM(AssignmentFlag)/

          count( {$<System = {'Assignments'}>} [Activity Date] ) ) * 0.40 +

          count( {$<LoginFlag = {0}>} [Activity Date] )/

          count( {$<System = {'Network login'}>} [Activity Date] ) * 0.30)

  )

View solution in original post

1 Reply
ToniKautto
Employee
Employee

You should look into eliminating the syntethic key in your data model, since this is likely to cause problems in the long run with your calculations.

Please notice that you have altered the Conditional show for the fields and not for the rows. This means that when the condition you have set up is equal to True, then the field will be show else it will be hidden.

The quick fix is to set the conditional show to always show, so that you don't accidentally hide a column in your table. Then you can add a IF statement in your  expression, meaning that if your calculation is below the vRiskRnage variable then the calculation shoudl be executed. Note that when the value is above the variable the IF will set the field value to Null, which will not be presented since you have Suppress Zero Values enabled for the table object.

Keep in mind that this type of double calculation can get heavy if you app has a lot of data and the caluculation is complex. Therefore it is recommended to do as much calculation as possible in the load script to minimize the impact runtime performance.

=if( (

          (SUM(AttendanceFlag)/count( {$<System = {'Lecturers'}>} [Activity Date] )  * 0.30 +

          (SUM(AssignmentFlag)/

          count( {$<System = {'Assignments'}>} [Activity Date] ) ) * 0.40 +

          count( {$<LoginFlag = {0}>} [Activity Date] )/

          count( {$<System = {'Network login'}>} [Activity Date] ) * 0.30)

      ) < $(vRiskRange),

          (SUM(AttendanceFlag)/count( {$<System = {'Lecturers'}>} [Activity Date] )  * 0.30 +

          (SUM(AssignmentFlag)/

          count( {$<System = {'Assignments'}>} [Activity Date] ) ) * 0.40 +

          count( {$<LoginFlag = {0}>} [Activity Date] )/

          count( {$<System = {'Network login'}>} [Activity Date] ) * 0.30)

  )