Qlik Community

Ask a Question

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
Qlik Highlights 2020 Giveaway! Watch, reply and have a chance to win a $200 Amazon Gift Card! Watch Video
cancel
Showing results for 
Search instead for 
Did you mean: 
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
MVP & Luminary
MVP & Luminary

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
MVP & Luminary
MVP & Luminary

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

Creator
Creator

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

MVP & Luminary
MVP & Luminary

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