Qlik Sense Business Analyst Certification (2024) — Question 9
A data architect needs to write the expression for a measure on a KPI to show the sales person with the highest sales. The sort order of the values of the fields is unknown. When two or more sales people have sold the same amount, the expression should return all of those sales people.
Which expression should the data architect use?
Answer options
- A. Concat(DISTINCT IF(Aggr(Rank(Sum(Sales),4),SalesPerson)=1,SalesPerson),' ')
- B. FirstSortedValue(DISTINCT SalesPerson,-Aggr(Sum(Sales),SalesPerson))
- C. FirstSortedValue(SalesPerson,-Aggr(Sum(Sales),SalesPerson))
- D. Concat(DISTINCT IF(Aggr(Rank(Sum(Sales),1),SalesPerson)=1,SalesPerson),' ')
Correct answer: D
Explanation
The correct answer is D because it uses the Rank function to identify all salespeople who have the highest sales (rank 1) and concatenates their names. Options A, B, and C do not appropriately handle ties or do not return all salespeople with the highest sales, making them unsuitable for this requirement.