when i apply a filter (not exposed) to a list of items the Views Calc is returning the values as if the filter was not applied. For example, without the filter there are 300 items, when the filter is applied, there are about 50 items, but Views Calc is returning a Total Count of 300, not respecting the filter.

Thank you.

BTW, i have a project i would like to use Views Calc in, I am willing to sponsor this fix as well as fixing the issue where Views Calc does not respect groupings (i.e. returns for each group the total values, not the group values)

CommentFileSizeAuthor
#1 ScreenHunter_01 Sep. 11 14.23.jpg62.19 KBakolahi

Comments

akolahi’s picture

StatusFileSize
new62.19 KB

Attached is an example of the behavior. I have four filters

1. Node type filter
2. Content (select box) filter
3. Date filter - Exposed
4. Content (select box) filter - Exposed

Filters 3 and 4 are exposed and filters 1 and 2 are hidden.

In the example there are clearly 4 items returned, but View's Calc Count is 8. Also the Sum etc. fields lead me to believe that Views Calc is not respecting the filters.

akolahi’s picture

I have further noticed that an exposed date filter by itself works and an exposed content text select box filter by itself works... it's when i combine the two that i'm getting the strange behavior.

kthull’s picture

subscribing

luco’s picture

same here, except that date filters get completely ignored.

I need to generate a paycheck report for pilates teachers. it's for a small business, but it's crucial. and if I'm unable to filter by date, it's pointless.

I can also contribute financially, though not very much, since I get paid with free classes ;)

luco’s picture

well, I got the DEV version and now it's working. but like described on the project page, multi-value CCK fields throw error messages. and I need those fields because of the project I'm currently in. any idea when a patch will be up, and how can we test it?

cheers

luco’s picture

another thing.

I have a content type with multi-value fields. tried adding the NID instead: still got errors. I even tried discarding those fields from the view but that didn't "work".

technically, it works for COUNT (hooray for Sesame Street, LOL) but the error message appears no matter what.

gorillaz.f’s picture

I've got the same problem here. I exposed some text select filter and a date filter, but the calc result ignore the filter indeed.
Any solution could be provided ? thanks a lot!
p.s. using recommended version of views and views_calc

drclaw’s picture

I am also having a similar problem. In my case, however, I have exposed filters and it is only ignoring the default values of the filters.

For example, I have an exposed date filter with default values of Nov 1 to Nov 30. When visiting the page at www.example.com/path/to/view I get the right number of rows filtered but views_calc calculates every row in the db.

However, if I hit the "apply" button on the exposed filter panel (which sends me to www.example.com/path/to/view?&timestamp[min]=November+01%2C+2010&timestamp[max]=November+30%2C+2010) I get the correct views_calc calculation.

Hope this makes sense!

I am also using the recommended versions of views2 and views_calc

jtjones23’s picture

subscribing

miro_dietiker’s picture

Status: Active » Closed (works as designed)

In current dev we can apply filter cleanly.

There are multiple issues covered in this document, so i limit the issue to the "filters not respected" one.
Please open new issues for other bugs.

Added an issue about this date match problem:
#1037138: Exposed filter results in wrong query match