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

Set analysis on all given value

Let say I have a table with 3 fields: Subject , Name , Grade

I want to test if in any given subject the average is above 60 – so just want to see Yes or No for that test – do not need a list of all subjects.

How will you recommend doing it elegantly? set analysis?

1 Solution

Accepted Solutions
sunny_talwar

My bad, try this

If(Sum(Aggr(If(Avg(Grade) > 60, 1), Subject)) >= 1, 'Yes', 'No')

View solution in original post

12 Replies
sunny_talwar

In a chart? May be just this

Dimension

Subject

Expression

If(Avg(Grade) > 60, 'Yes', 'No')

surendraj
Specialist
Specialist

Here you need to mention on what field you want to apply aggregation.

here you may have marks field.check your data once.

Anonymous
Not applicable
Author

That will give me the answer for all subjects combine, I want to check each Subject separately, thanks

sunny_talwar

Why will this give you all subject combined? Subject is a dimension... so the Avg(Grade) will be checked for each subject and will give you yes or no based on the avg for each subject

Peter_Cammaert
Partner - Champion III
Partner - Champion III

The context of your requirement is important. Where do you want to include this Yes/No indicator? In a straight table? In a straight table with other dimensions besides Subject? On its own in a text box?

Sunny already supplied you with a perfect solution for a Straight Table with a single dimension. What is lacking?

Anonymous
Not applicable
Author

Thanks Sunny and Peter and Surendra - I just want the answer of yes no in a Text object without giving me the details ... so no Chart... I do not want to see all the results, just need to know if on at least one subject the average on this subject is above 60.  Many thanks

sunny_talwar

So you want to know that if there are 10 subjects, at least one have an average of over 60?

Anonymous
Not applicable
Author

yes that is what I am after, sorry I was not  clear.

sunny_talwar

Try this

If(Sum(Aggr(If(Avg(Grade) > 60, 1), Subject) >= 1, 'Yes', 'No')