Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Multiple Field Selections Set Analysis

Set Analysis trouble doesn't seem to be anything new... but I can't find any old posts that address my issue...

I'm attempting to show a total count of surveys regardless of 3 possible selections. The user can select the question text, question ID, and question category. I would like these three selections to be excluded in the set analysis. Selections like date, location, etc. can remain. I essentially need to combine the following into one set analysis:

COUNT

({$<AvatarQuestionCategoryNM = >} PatientSurveyID)



COUNT({$<QuestionTXT = >} PatientSurveyID)

COUNT({$<QuestionID= >} PatientSurveyID)

Thanks in advance!

1 Solution

Accepted Solutions
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

As a side comment - you seem to be going back and forth with the "dry" formula... It could be much easier if you could post a small working example and everyone could take a stab at resolving it...

Now, let me ask you this - what do you mean when you say:


S-Jenson wrote: I would like these three selections to be excluded in the set analysis.


Do you mean - ignore selections in those three fields? Then the SA expression should be :

{$<Field1=, Field2=, Field3= >}

The above expression will cause ignoring any user selections in the three fields and respecting any other user selections.

If by "exclude" you mean reversing the selection in those three fields, or excluding the selected values from calculation, then you need to use the syntax with E( ...) where E stands for "Excluded values" - something like this:

{$<Field1= E(Field1), Field2=E(Field2), Field3=E(Field3) >}

Be careful, the expression above might be heavy if some of the fields have many distinct values...

I highly recommend printing out the article "Set Analysis" from the Help Section and reading it thoroughly - you will find examples for just about any situation there.

View solution in original post

10 Replies
martin59
Specialist II
Specialist II

Hi,

Is that you want ?

Count({<AvatarQuestionCategoryNM={"$(=Only(AvatarQuestionCategoryNM))"}, QuestionTXT={"$(=Only(QuestionTXT))"}, QuestionID={"$(=Only(QuestionID))"}>} PatientSurveyID)


Not applicable
Author

That doesn't do it - I do not want the count to be affected by any of those 3 potential selections.

martin59
Specialist II
Specialist II

<pre>Count({$-(<AvatarQuestionCategoryNM={"$(=Only(AvatarQuestionCategoryNM))"}>+<QuestionTXT={"$(=Only(QuestionTXT))"}>+<QuestionID={"$(=Only(QuestionID))"})>} PatientSurveyID)
Not applicable
Author

That's just bringing back NULL in the cell now... This seems closer, I get taking the current selections excluding the set, but I don't think the union of those 3 works?

Not applicable
Author

I'm not sure why Martin out the 'only' key word in his suggestions. I believe his set is otherwise correct. (just eyeballing), but using the word 'only' he doesn't make sense.

take out all of the 'only' keywords in that set, and you may be in business.

Not applicable
Author

This is what I put in and it's still returning NULL.

Count

({$-(<AvatarQuestionCategoryNM={"$(=(AvatarQuestionCategoryNM))"}>+<QuestionTXT={"$(=(QuestionTXT))"}>+<QuestionID={"$(=(QuestionID))"})>} PatientSurveyID)





martin59
Specialist II
Specialist II

Try that :

<pre><blockquote><pre>Count({<AvatarQuestionCategoryNM=E(AvatarQuestionCategoryNM)>+<QuestionTXT=E(QuestionTXT)>+<QuestionID=E(QuestionID)>} PatientSurveyID)

I didn't test it.
Not applicable
Author

Continue to get a NULL value... What do the "E's" mean in this formula??

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

As a side comment - you seem to be going back and forth with the "dry" formula... It could be much easier if you could post a small working example and everyone could take a stab at resolving it...

Now, let me ask you this - what do you mean when you say:


S-Jenson wrote: I would like these three selections to be excluded in the set analysis.


Do you mean - ignore selections in those three fields? Then the SA expression should be :

{$<Field1=, Field2=, Field3= >}

The above expression will cause ignoring any user selections in the three fields and respecting any other user selections.

If by "exclude" you mean reversing the selection in those three fields, or excluding the selected values from calculation, then you need to use the syntax with E( ...) where E stands for "Excluded values" - something like this:

{$<Field1= E(Field1), Field2=E(Field2), Field3=E(Field3) >}

Be careful, the expression above might be heavy if some of the fields have many distinct values...

I highly recommend printing out the article "Set Analysis" from the Help Section and reading it thoroughly - you will find examples for just about any situation there.