Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Franz_Lackner
Contributor II
Contributor II

Aggregate with different set expressions

there are 2000 properties in 10 different countries. Each property has a purchase price.
there are 5 appraisers. Each of them reassess some of the 20 properties.
This leads us to two tables.

1: property, country, purchase price, date of sale announcement, status of sale
2: appraiser, property, estimated price

Table one shows property, country, purchase price overruled by estimated price of selected appraiser if exists (called "current price")

IF(
     ISNULL(ONLY([estimated price by appraiser]))
     ,ONLY($(setexpression) [purchase price])
     ,ONLY([estimated price by appraiser])
     )

where $(setexpression) restricts to specific timeframe when sales have been announced first as well as to specific status of sale

wanted: table two should show the sum of current prices per country (formula above aggregated by country) restricted to properties that fit to $(setexpression) in general

1 Solution

Accepted Solutions
Franz_Lackner
Contributor II
Contributor II
Author

Thank you very much. To my shame, I didn't know about the ALT function until now.

BR

View solution in original post

2 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Sum({set expression} Alt([estimated price by appraiser], [purchase price]))

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

Franz_Lackner
Contributor II
Contributor II
Author

Thank you very much. To my shame, I didn't know about the ALT function until now.

BR