Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello -
I am looking to figure out a way to calculate the average of 4 (four) different selections (once they have been selected)
I have 4 categories:
- Opponent
- Time
- Month
- Day
For each category, there are values assigned to the records in them. (For example, once Thursday is selected, the average sales for Thursday is 12,345) This is true for each category.
I am looking to have an expression that shows the average once a selection is made in each category.
Thank you.
Apply Swuehl expression like below:
=RangeAvg(NUM(SUM(avgTEAMSALES), '#,###.'), NUM(SUM(avgTIMESALES), '#,###.'),NUM(SUM(mnthavgSALES), '#,###.'),NUM(SUM(dayavgSALES), '#,###.'))
Can you post a sample app and the expected output you are looking for ?
Can't upload the app.
Expected output is an average of four selections
Maybe something like this in a text box:
=If( GetSelectedCount( Day ) = 1, Sum(Sales) / Count(DISTINCT DateField) )
// or how you calculate your average
Similar for the other three fields.
edit:
Ultimately, I will select:
- Opponent
- Time
- Month
- Day
Each selection will yield a numerical value.
Opponent : 18102
Time : 17897
Month : 17709
Day : 18249
I know the average of these number is 17,989. However, I want to build an expression that will reflect four selections being made and averaging them
If you can calculate your four averages in expressions, you can use
=RangeAvg( Expression1, Expression2, Expression3, Expression4)
to calculate your resulting average.
rangeavg(
sum( $<Opponent={"??????"},Time={"??????"}, Month={"??????"},Day={"??????"} >} Sales) ,
sum( $<Opponent={"??????"},Time={"??????"}, Month={"??????"},Day={"??????"} >} Sales) ,
sum( $<Opponent={"??????"},Time={"??????"}, Month={"??????"},Day={"??????"} >} Sales) ,
sum( $<Opponent={"??????"},Time={"??????"}, Month={"??????"},Day={"??????"} >} Sales)
)
--> ??????:each line a selection... but I don't know, if I really understood your problem
!
Apply Swuehl expression like below:
=RangeAvg(NUM(SUM(avgTEAMSALES), '#,###.'), NUM(SUM(avgTIMESALES), '#,###.'),NUM(SUM(mnthavgSALES), '#,###.'),NUM(SUM(dayavgSALES), '#,###.'))