Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
karthikeyan1504
Creator III
Creator III

Input box issue

Hi All,

jagan‌, tresesco‌, hic‌, swuehl‌, gwassenaar‌, maxgro

I have the details of year, no of students, students responded to the survey and their ratings in students table.

The requirement to have 4 input box filter to select minimum and maximum of no of students and the no of respondents to choose.

Please refer the below screenshot,

Capture.PNG

Based on the input box filters of minimum and maximum no of students and the no of respondents the expression should change in 'Test' table. Here my challenging is to handle the expressions when the value is not entered in any input box filter or entered in any of one or two or three. I have tried conditional view of expression based on the filter values, but as we have four filters the combination is 16 for each expressions.

It looks bit tedious. Could anyone please help me on this?

Please find the attached qvw and data...

Thanks & Regards,

Karthikeyan.

1 Solution

Accepted Solutions
tresesco
MVP
MVP

May be like attached sample


Sum({<Term={"=Sum([No of Students])>=$(vMinClass) and Sum([No of Students])<=$(vMaxClass)"}>}[No of Students])

Apply, input constraint (may be Integer) to handle the situation when nothing is entered.

View solution in original post

19 Replies
karthikeyan1504
Creator III
Creator III
Author

Hi TamilArasu

Please refer the test object in the dashboard. The Rating expression should change according to the values users enters in input box filter. The challenge is to make the expression flexible, since the user may or may not enter the values in all the input box.

tamilarasu
Champion
Champion

Hi Karthikeyan,

I have tried and ended with nested If expression.

karthikeyan1504
Creator III
Creator III
Author

Could you please reply me the expression?

tamilarasu
Champion
Champion

Attached.

karthikeyan1504
Creator III
Creator III
Author

Hi,

I have already completed this for no of students(vMinClass & vMaxClass) filter. But still the no of respondents (vMinResp & vMaxResp) also needs to be included in Average of rating expression.

tamilarasu
Champion
Champion

I understood now.

tresesco
MVP
MVP

May be like attached sample


Sum({<Term={"=Sum([No of Students])>=$(vMinClass) and Sum([No of Students])<=$(vMaxClass)"}>}[No of Students])

Apply, input constraint (may be Integer) to handle the situation when nothing is entered.

karthikeyan1504
Creator III
Creator III
Author

Hi,

Thanks for your response.

you have considered only the first two input box values. we need to consider all four input box values in expression such as,


avg({<Term={"=Sum([No of Students])>=$(vMinClass) and Sum([No of Students])<=$(vMaxClass)

               and Sum([No of Respondents])>=$(vMinResp) and Sum([No of Respondents])<=$(vMaxResp)"}>} Rating)

tresesco
MVP
MVP

That I thought you would be able to adjust accordingly. Are you stuck somewhere there?