# App Development

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save \$300 before February 6: REGISTER NOW!
cancel
Showing results for
Did you mean:
Contributor III

## Set Analysis + Alternate State + Filter Selection

I have two alternate states: C1 and C2.

I have two filters, both of which use the same dimension: [Sold Month Year] - which is a monthname([Sold Date]) in the data load editor. I apply C1 and C2 to the filters even though they are the same dimension.

When I filter C1, I choose Sep 2021, Oct 2021, and Nov 2021.

When I filter C2, I choose Dec 2021, Jan 2022, and Feb 2022.

I am trying to count the number of tickets like this:

SUM({"C2" <[transaction_type]={'PAYMENT'}>} Ticket_Cnt)

But I want the calculated measure to only get me the minimum (or earliest month) - which is Dec 2021 figures only.

How do I ensure that the measure takes into account for the selection?

I have tried this:

SUM({"C2" <[trans_type]={'PAYMENT'}, [Sold Month Year] = {"MONTHNAME(=DATE(Min([Transaction Month Year]),'MMM YYYY'))"} >} txn_cnt)

But it does not work.

Not sure what I can do - can anyone assist?

Labels (1)
• ### General Question

1 Solution

Accepted Solutions
Contributor III
Author

Solved it!

MIN(AGGR(SUM({"C2"<[trans_type]={'PAYMENT'}>} txn_cnt),[Transaction Month Year]),)

2 Replies
Contributor III
Author

SUM({"C2" <[trans_type]={'PAYMENT'}, [Sold Month Year] = {"MONTHNAME(=DATE(Min([Sold Month Year]),'MMM YYYY'))"} >} txn_cnt)

Sorry, I meant I tried this ^ and it did not work.

Contributor III
Author

Solved it!

MIN(AGGR(SUM({"C2"<[trans_type]={'PAYMENT'}>} txn_cnt),[Transaction Month Year]),)

Tags
Community Browser