Filters doubt

  

Hi! 

I have a doubt about the filters in the aggregates, what are the difference between use separate filters and use only one filter with all your conditions for example,


Do This:


Or Do this:

What is the diffence, can somebody tell me?, I'm gonna appreciate it a lot :) 


Best Regards.

Hi,

It is the same.

Solution

Hi Omar, Putu,

Yes, like Putu says, the end result is the same: seperate Filters are "and"-ed together (as you can check by looking at the SQL that's output). However (there's always an _however_ :)), for the sake of readability, I'd go for a single condition per Filter, if possible (of course, when you need an "or", you do have to put multiple conditions on a single Filter).

This is because 1) the UI of Aggregates is sub-par, and long Filter lines are cut off and there isn't even a mouse-over tooltip to show the actual contents. So you can have a situation where the "and XXX = YYY" is completely invisible at first glance, making the Aggregate difficult to read. And 2), because humans are better at parsing seperate rules listed one below the other, than rules strung together with "and"s, so understandability gains from doing the latter.

Solution

Kilian Hekhuis wrote:

Hi Omar, Putu,

Yes, like Putu says, the end result is the same: seperate Filters are "and"-ed together (as you can check by looking at the SQL that's output). However (there's always an _however_ :)), for the sake of readability, I'd go for a single condition per Filter, if possible (of course, when you need an "or", you do have to put multiple conditions on a single Filter).

This is because 1) the UI of Aggregates is sub-par, and long Filter lines are cut off and there isn't even a mouse-over tooltip to show the actual contents. So you can have a situation where the "and XXX = YYY" is completely invisible at first glance, making the Aggregate difficult to read. And 2), because humans are better at parsing seperate rules listed one below the other, than rules strung together with "and"s, so understandability gains from doing the latter.


thanks for the answer this help me to clarify and to do my app with the best practice possible

Regards.

Glad I could be of help!