4 Replies Latest reply: Oct 13, 2009 11:12 AM by Stephen Redmond

# 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.

• ###### Set Analysis - Get records that share an implicitly selected dimension

Hi,

I will usually use the Concat function here:

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

Stephen

• ###### Set Analysis - Get records that share an implicitly selected dimension

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?

• ###### Set Analysis - Get records that share an implicitly selected dimension

Found it. The proper syntax is:

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

• ###### Set Analysis - Get records that share an implicitly selected dimension

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