
Creator
2019-01-10
09:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Set Analysis: syntaxes, examples
Hello Team,
Below is sample table related to my query :
SurveyId,Question,QuestionId,Answer
1,Overall Rating,10,85
1,CompetitorRating,11,91
2,Overall Rating,10,83
2,CompetitorRating,11,
3,Overall Rating,10,81
3,CompetitorRating,11,64
We want to find Average of Overall Rating only when CompetitorRating is not blank.
Here the answer will be average of 85 and 81 because user has answered for CompetitorRating only for those two surveys.
I tried using P function but did not work.
Sum({<SurveyId= P({<QuestionId= {'11'},Answer-= {' '}>}) * P({<QuestionId= {'10'}>})>}Answer)
Kindly let me know for any clarifications.
Thanks,
Arvind
518 Views
2 Replies

MVP
2019-01-10
09:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May be this
Sum({<SurveyId = {"=Sum({<QuestionId= {'10'}>} Answer) <> 0"}>} Answer)
511 Views

Creator
2019-01-10
09:51 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is not working.
Actually the logic is we need to find sum/average of those Survey Ids where Competitor has entered some values.
Competitor has entered values for Surveys 1 and 3 , in those surveys Answer is 81 and 85 so average and sum should be of that.
In other words , we want to calculate values of the Company only when Competitor has entered some values.
So the logic is like :
sum of Answer for question id 10
when the answer for Question id 11 is not blank.
Actually the logic is we need to find sum/average of those Survey Ids where Competitor has entered some values.
Competitor has entered values for Surveys 1 and 3 , in those surveys Answer is 81 and 85 so average and sum should be of that.
In other words , we want to calculate values of the Company only when Competitor has entered some values.
So the logic is like :
sum of Answer for question id 10
when the answer for Question id 11 is not blank.
509 Views
