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

how to solve this with Set Analysis and If statement

count those ProductIDs where status is created and distinct count of TransactionID =2. so in my below eg, I should get only XYZ002 with

TransID 10002 & 10003. I tried

count({<Status={CREATED}, ProductID={'=count(DISTINCT TransactionID)=2'}>}Distinct

ProductID)  but it is not working

zs_itch.PNG

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Maybe you are looking for

count({< ProductID={"=count({<Status={CREATED} >} DISTINCT TransactionID)=2"}>} Distinct

ProductID)

View solution in original post

6 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Try this,

=Count({<Status = {"Created"},ProductId = {"=count({<Status = {'Created'}>}Distinct TrxID)=2"}>}Distinct ProductId)

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
swuehl
MVP
MVP

Maybe you are looking for

count({< ProductID={"=count({<Status={CREATED} >} DISTINCT TransactionID)=2"}>} Distinct

ProductID)

petter
Partner - Champion III
Partner - Champion III

How to solve it is a bit dependent on how you want to display your result - which you haven't told us.

I assume you want the result in a Straight Table and then it is quite simple to display the ProductID which

match your criteria like this:

Add one single dimension which is ProductID and one single expression which is

Count( { < Status = { 'CREATED' } > } TransactionID ) = 2

Then you will have a two column straight table with a single row - XYZ002.

If you want a list of ProductIDs in a text box you could use this expression:

=Concat( Aggr( If( $(A1)  , ProductID ) , ProductID ) , Chr(10) )

Kushal_Chawda

try,

Count({<ProductId = {"=count({<Status = {'CREATED'}>}Distinct TrasactionID)=2"}>}Distinct ProductId)

maxgro
MVP
MVP

count({<Status={CREATED}, ProductID={"=count({$ <Status={CREATED}>} DISTINCT TransactionID)=2"}>}Distinct ProductID)

Anonymous
Not applicable
Author

Thanks everyone. Special Thanks goes to sweuhl for being the first responder to be correct.