Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Is it possible to use many filters with count function but combined with an OR instead of default AND "," ?
if yes how ?
if not, is there any other fuction witch can filter data based on fields and combining many conditions with logical operators :
and, or, not ....
Hi @Seven7 ,
You could use an expression as below:
COUNT( {< onefield = condition> + < anotherfield = condition ......>} distinct[fld] )
I hope it can help.
Best Regards
Thank you @agigliotti 😊
Not sure. can you give an example what your trying to say and expected output please?
I want to use COUNT fuction in this way :
COUNT(${<onefield=condition OR anotherfield=condition ......>} distinct[fld])
is it possible ? if not how can we use many conditions with OR operator
it seems like the comma separator between the conditions is an explicit AND !!
Hi @Seven7 ,
You could use an expression as below:
COUNT( {< onefield = condition> + < anotherfield = condition ......>} distinct[fld] )
I hope it can help.
Best Regards
Thank you @agigliotti 😊
Examples of using AND and OR in Set Analysis:
Load the dataset below and use the expressions above in a KPI to test functionality:
Table:
Load * Inline [
transaction_id, transaction_timestamp, transaction_amount, size, color
3750, 2018-08-30T19:36:12Z, 23 ,L, Red
3751, 2018-08-30T19:36:13Z, 5356.31 ,M, Orange
3752, 2018-08-30T19:36:14Z, 15.75 ,S, Blue
3753, 2018-09-16T12:30:00Z, 1251 ,L, Black
3754, 2018-09-16T13:15:30Z, 21484.21,XS,Red
3754, 2018-09-16T13:20:30Z, 21484.21,XS,Red
3754, 2018-09-16T13:35:30Z, 21484.21,XS,Red
3754, 2018-09-16T13:35:30Z, 21484.21,S, Red
3755, 2018-09-30T13:35:30Z, -59.18, M, Blue
];
Thank you @duchezbr for your reply
but in this case (i.e., commas within an element set signify OR) the condition will be about the same expression/field ....
in my case (where conditions are applied on differents expressions/fields) the "+" is the solution