Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm trying to do a very simple expression where I need to count the distinct Customer when Field1 values are LESS THAN Field2 values.
Field1 Field2
2 3
Count(distinct {$<Field1 = P({1<Field1={}>}Field2)>}Customer)
Thank you.
A correct solution is depending on your data model, so I assume the most simple one, all fields Customer, Field1 and Field2 in one table and only one combination per Customer.
Maybe like this:
=count( {$<Customer = {"=Field1<Field2"}>} DISTINCT Customer)
or similar without using set analysis (and with less restrictions to your data model):
=count(DISTINCT if( Field1 < Field2, Customer))
Count(distinct {$<Field1 = {'<$(=Field2)'}>}Customer)
A correct solution is depending on your data model, so I assume the most simple one, all fields Customer, Field1 and Field2 in one table and only one combination per Customer.
Maybe like this:
=count( {$<Customer = {"=Field1<Field2"}>} DISTINCT Customer)
or similar without using set analysis (and with less restrictions to your data model):
=count(DISTINCT if( Field1 < Field2, Customer))
Thanks Jose for your input!
swuehl. Thanks. Your set analysis solution worked. I couldn't use the example without the set analysis because what you solved for me was a part of a much larger set analsys expression.
much appreciated!