Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Name | Rating_A | Rating_B | Rating_C |
3D Homestay | 7.5 | 7.4 | 0 |
3HOWW Hostel (Khao San) | 8.2 | 8.0 | |
7 Bidadari Seminyak | 7.6 | 8.2 | 8.3 |
Try rangeavg(only({<Rating_A={'<>0'}>}Rating_A), only({<Rating_B={'<>0'}>}Rating_B), only({<Rating_C={'<>0'}>}Rating_C)) as expression
Try rangeavg(only({<Rating_A={'<>0'}>}Rating_A), only({<Rating_B={'<>0'}>}Rating_B), only({<Rating_C={'<>0'}>}Rating_C)) as expression
Genius... By the way am i able to work this in script level?
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.