BlackFriday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Qlik Exam QSDA2024 Topic 4 Question 3 Discussion

Actual exam question for Qlik's QSDA2024 exam
Question #: 3
Topic #: 4
[All QSDA2024 Questions]

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?

A)

B)

C)

D)

Show Suggested Answer Hide Answer
Suggested Answer: A

The requirement is to create a measure that identifies the salesperson with the highest sales. If multiple salespeople have the same highest sales amount, the measure should return all of those salespeople.

Explanation of Option A:

Rank(Sum(Sales), 1): The Rank() function is used to rank salespersons based on the sum of their sales. The rank 1 indicates the top position.

Aggr() Function: This function aggregates the data and returns the results grouped by the SalesPerson field.

IF() Condition: The IF condition checks if the salesperson's rank is 1 (highest sales).

Concat(DISTINCT ...): The Concat() function concatenates all the salespersons who have the highest sales, separated by spaces or another delimiter, ensuring that all top performers are returned.

Example:

If three salespersons have the highest sales, this expression will return all three names separated by a space.


Contribute your Thoughts:

Tracey
1 months ago
Option B for the win! Simple and effective. Though I have to admit, the MAX() and FILTER() combo is kinda satisfying to look at.
upvoted 0 times
...
Tammi
1 months ago
Haha, this reminds me of the time my boss asked me to write a query to find the 'best-selling' product. I ended up with something like 50 lines of code to handle all the edge cases. Good times!
upvoted 0 times
Melda
6 days ago
User 2: Option B looks like it might handle those edge cases well.
upvoted 0 times
...
Tamie
9 days ago
User 1: I feel your pain, writing those complex queries can be a challenge.
upvoted 0 times
...
...
Belen
2 months ago
That makes sense, thanks for explaining.
upvoted 0 times
...
Luz
2 months ago
Hmm, I'm torn between B and C. Both seem reasonable, but C might be the safer choice if the sort order of the fields is unknown.
upvoted 0 times
Viola
6 days ago
User 1
upvoted 0 times
...
Elenore
7 days ago
User 2
upvoted 0 times
...
Barney
15 days ago
User 1
upvoted 0 times
...
...
Hannah
2 months ago
I'm gonna go with Option C. It's a bit more complex, but it seems to handle the case where there are multiple sales people with the same highest value.
upvoted 0 times
Laquita
18 days ago
Option C it is then. It's better to have a more complex expression than to miss out on any sales people.
upvoted 0 times
...
Veronika
22 days ago
I would also go with Option C. It's better to be safe and cover all possibilities.
upvoted 0 times
...
Madonna
1 months ago
I agree, Option C seems like the most comprehensive solution.
upvoted 0 times
...
Reyes
2 months ago
I think Option C is the best choice too. It covers all scenarios.
upvoted 0 times
...
...
Laquita
2 months ago
Option B uses the Rank function which can handle ties in sales amounts.
upvoted 0 times
...
Lorenza
2 months ago
Option B looks like the correct answer to me. It uses the MAX() function to get the highest sales value and the FILTER() function to return all the sales people with that value.
upvoted 0 times
Kristeen
2 months ago
Yes, Option B is the best choice here. It ensures that all sales people with the highest sales are returned in the expression.
upvoted 0 times
...
Elden
2 months ago
I agree, Option B seems to be the right choice. It covers the scenario where multiple sales people have the same highest sales.
upvoted 0 times
...
...
Belen
2 months ago
Why do you think option B is better?
upvoted 0 times
...
Laquita
2 months ago
I disagree, I believe option B is the best choice.
upvoted 0 times
...
Belen
2 months ago
I think the data architect should use option A.
upvoted 0 times
...

Save Cancel