Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
calvintang
Contributor III
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)
1 Solution

Accepted Solutions
calvintang
Contributor III
Contributor III
Author

Solved it!

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

 

 

View solution in original post

2 Replies
calvintang
Contributor III
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.

calvintang
Contributor III
Contributor III
Author

Solved it!

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