Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Find Key with min value and calc average value with that key

Need help ))
I want to find min value in a table, than find a key for that value and after find average value for that key
i thought this is common taks but failed to find an answer
1/ Variable to find key with min value
MinString({$<HotelCost = {$(=Min(HotelCost))}>} RoomCategoryName)
Then i put this in expressions
=$(vHotelBaseRoom)
2/  Then i try to calc average value with that key
=Avg({$<RoomCategoryName={$(=$(vHotelBaseRoom))}}>} HotelCost)
Receive NULL
Tags (2)
1 Reply
Not applicable

Find Key with min value and calc average value with that key

Dear all, I found an answer for my problem by myself - Subset does not include current row context - that's why when i apply variable - i find min price room name
but this room name is not for this hotel and then i dont get anything

So i found my error - if you want to find minimum using this context then you nee to use if else expression

Community Browser