Hi, Everyone
I just wonder How to count this criteria,
say, In a table consist of three columns:
NAME A: (TYPE TEXT)
NAME B: (TYPE TEXT)
AMOUNT : (TYPE NUMBER)
I need this result,
If I Write a data in column NAME A or NAME B, the column AMOUNT will appear 1
If I Write a data in column NAME A and NAME B, the column AMOUNT will appear 2
I used this formula in AMOUNT, Count([NAME A]+[NAME B]), but it didn't work.
any idea?
Solved! Go to Solution.
Please try in app formula of [AMOUNT] the following expression
I
IFS( OR(
AND( ISNOTBLANK([Name A]), ISBLANK([Name B])),
AND( ISNOTBLANK([Name B]), ISBLANK([Name A]))
), 1 ,
AND( ISNOTBLANK([Name A]) , ISNOTBLANK([Name B])) ,
2
)
Yeah it works 😁 . thank you @Suvrutt_Gurjar
Please try
IFS( OR(
AND( ISNOTBLANK(Name A]), ISBLANK(Name B])),
AND( ISNOTBLANK(Name B]), ISBLANK(Name A]))
), [AMOUNT]=1 ,
AND( ISNOTBLANK(Name A]) , ISNOTBLANK(Name B])) ,
[AMOUNT]=2
)
thanks for replaying, but it appears
The expression is valid but its result type 'Yes/No' is not one of the expected types: Number
Please share the screenshot of expression and error and column setting.
Sorry, there were typos in expression, several "[" parenthesis were missing. Please try
IFS( OR(
AND( ISNOTBLANK([Name A]), ISBLANK([Name B])),
AND( ISNOTBLANK([Name B]), ISBLANK([Name A]))
), [AMOUNT]=1 ,
AND( ISNOTBLANK([Name A]) , ISNOTBLANK([Name B])) ,
[AMOUNT]=2
)
When I write data in NAME A or B , The Amount will count 1, but When I write Data both NAME A and B it will count 2, because it count number if data in the two columns. Can we use Count formula in AMOUNT column ? thank you @Suvrutt_Gurjar
this is the data table
Please try in app formula of [AMOUNT] the following expression
I
IFS( OR(
AND( ISNOTBLANK([Name A]), ISBLANK([Name B])),
AND( ISNOTBLANK([Name B]), ISBLANK([Name A]))
), 1 ,
AND( ISNOTBLANK([Name A]) , ISNOTBLANK([Name B])) ,
2
)
Yeah it works 😁 . thank you @Suvrutt_Gurjar
User | Count |
---|---|
44 | |
31 | |
29 | |
14 | |
14 |