Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I'm trying to identify customers who have two or more different status values within the data, and I would appreciate guidance on how to achieve this both in the Edit Script and through an expression that can be used in a chart or table.
Thank you in advance for your support!
Tried this Sum({< Name = {'=Count( {1} Status) >1'}>} Purchase)
and
CustomerMonthlyStatusFlag:
LOAD
Number,
Month Year,
IF(COUNT(DISTINCT Status) >= 2, 1, 0) AS HasMultipleStatuses
RESIDENT YourMainTable
GROUP BY Number, Month Year;
use the same script and change the set analysis as below
Sum({< HasMultipleStatuses = {1}>} Purchase)
Thanks,
Priyanka
I don't see anything wrong with the script code. You may want to check that the Month Year field is actually month-year and does not have an underlying date.
On the front end, assuming Number and Month Year are dimensions, you could just use the same formula as the expression, basically:
IF(COUNT(DISTINCT Status) >= 2, 1, 0)
use the same script and change the set analysis as below
Sum({< HasMultipleStatuses = {1}>} Purchase)
Thanks,
Priyanka