Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis - Get records that share an implicitly selected dimension

Not quite sure how to explain this, but here goes:

I am building a QV app that contains, amongst other things, customer data (name and industry) and revenue data. When a single customer is selected, a tab showing customer data is made visible. On this tab I want to present a list of customers that are in the same industry and their revenue. The industry is not explicitly selected, but a customer only has one industry, so when a single customer is selected an industry is also implicitly selected.

I have created a table containing customer name and an expression that looks like this:

Sum ({1<Industry = {$(Industry)}>} TotalRevenue)

This doesn't seem to work, but when I try something like

Sum ({1<Industry = {'Sporting Goods Store'}>} TotalRevenue)

it does work. I've tried every permutation that I could think of but am stuck. How can I get the value of the current (implicitly selected) industry and use it in the expression? Any help would be greatly appreciated.

1 Solution

Accepted Solutions
Not applicable
Author

Found it. The proper syntax is:

Sum ({1<Industry = {"$(=Industry)"}>} TotalRevenue)

View solution in original post

4 Replies
stephencredmond
Luminary Alumni
Luminary Alumni

Hi,

I will usually use the Concat function here:

Sum ({1<Industry = {"$(=Concat(Industry,'"'")"}>} TotalRevenue)

Stephen

Not applicable
Author

Stephen, thank you for your reply. Unfortunately, the answer you've posted doesn't seem to work. Do you (or someone else) have any other ideas?

Not applicable
Author

Found it. The proper syntax is:

Sum ({1<Industry = {"$(=Industry)"}>} TotalRevenue)

stephencredmond
Luminary Alumni
Luminary Alumni

What happens if you have more than one industry selected? Or is that what you were looking for all along.

Note that "$(=Concat(Industry,'","'))" will be the same as "$(=Industry)" where there is only one selected.

Stephen