Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help with set analysis

Hello All:

I'm unable to get a set analysis to work as expected.

I have a data table with a column for date, transaction type (sale, refund, void) and transaction store (100, 200, 300) as my dimensions, and then a measure such as "TRANSACTION_AMOUNT".

What I want to do is build a chart that shows the sum of sales for each store, but only for sales that equal 2

I'm using the following expression in my straight table (with store # and date as dimensions)

sum( {$<TRANSACTION_AMOUNT={2}>} TRANSACTION_AMOUNT)

This does give me a chart showing a store number, and then the sum of sales where transaction amount is $2.

However, it is then ignoring any selections I make in list boxes (for instance, I have a list box that is for date, and no matter what selection I make in this list box (or any other list box), the table shows a list of all dates, and all stores, with their sum of $2 transactions.

Set analysis is new to me, so do I have the syntax wrong?  I thought that using $ would give me the set of current selections, except add in a filter for transaction_amount.

All objects are in the same state, as the chart works fine when the expression is sum(TRANSACTION_AMOUNT), except it shows all transactions.

Thanks

1 Solution

Accepted Solutions
Not applicable
Author

this expression is correct

and should not change only when you change selection in field TRANSACTION_AMOUNT

could you post a sample qvw file?

View solution in original post

3 Replies
Not applicable
Author

this expression is correct

and should not change only when you change selection in field TRANSACTION_AMOUNT

could you post a sample qvw file?

swuehl
MVP
MVP

I can't see any reason why this shouldn't work as expected.

Could you post a small sample file?

Not applicable
Author

Thanks to both of you - I actually re-did this analysis on a new tab, and its working as expected.  I have no idea what was wrong with the original set up.