Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
n1ef5ng1
Creator
Creator

Urgent , average rating

Hi all,

I would like to create a new customized field call Average_Rating based on the information below.

Example for 3D HomeStay, the avg rating should be sum of all three (7.5+.7.4.0) divide by 2 instead of 3 as I am treating 0 and null value  as insignificant as it will distort the value heavily. This applies to 3HOWW hotel too where the avg rating is 8.1

Desired output for avg raating is

3DHomestay 7.45

3HOWW 8.1

7 Bidadari 8.03

    

NameRating_ARating_BRating_C
3D Homestay7.57.40
3HOWW Hostel (Khao San)8.28.0
7 Bidadari Seminyak7.68.28.3
1 Solution

Accepted Solutions
Gysbert_Wassenaar

Try rangeavg(only({<Rating_A={'<>0'}>}Rating_A), only({<Rating_B={'<>0'}>}Rating_B), only({<Rating_C={'<>0'}>}Rating_C)) as expression


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
Gysbert_Wassenaar

Try rangeavg(only({<Rating_A={'<>0'}>}Rating_A), only({<Rating_B={'<>0'}>}Rating_B), only({<Rating_C={'<>0'}>}Rating_C)) as expression


talk is cheap, supply exceeds demand
n1ef5ng1
Creator
Creator
Author

Genius... By the way am i able to work this in script level?

Gysbert_Wassenaar

Not this way. Set analysis doesn't work in the script. Unless you have serious performance problems I suggest using chart expressions instead of trying to do it in the script.


talk is cheap, supply exceeds demand