Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all
Count({$<adatefield = >} ... something to count)
I want to count a field but removing the selection of adatefield. If I try this with other field types (string, IDs etc) it works fine and selection is ignored, but not with date fields.
Can anyone help here?
It seems that you are using master item and not a direct expression in chart. Master Item is being treated differently in set analysis. To handle this - you can create a new field in the script with desired date format.
Though I am not very sure if this master item behavior is by-design or a bug.
Field types (string, IDs etc) can't be a deciding factor, it has to be something else. It could be that another date field is affecting the scope of your targeted date field or there could be another function being used in the expression where the date field reference is there. If you could share the actual expression you have - we could have a look and try help find that out.
this is the original expression:
Count({$<pen.wiedervorlage = >} pen.pen_id)
there is no other selection made. But if pen.wiedervorlage (a date field) is selected, the filter is (incorrectly) applied.
You mean - your count expression produce different results when you have just no selection and has selection only in that date field? That's something that should not be. Could you share a screen shot or sample showing the issue?
correct. I just reproduced the case in a testing environment and the problem occurs when the date in the filter is formatted to e.g. date(...). If the raw field is used in the filter than it works.
Do you have any idea how to handle that? The field of course can also be selected e.g. in a table not just in a filter pane and there may be also another formatting expression.
Even if you are using formatting date(), it should not affect unless you are using a different date field in set analysis and filter. Without screenshot/sample it is becoming harder to guess and suggest.
Totally agree with you. As ony 3 screenshots are allowed here you see the situation as it works just in a sample app. I use the table to filter on PAT_ID and the counter remains at 3 different PAT_IDs.
now the same but with the formatted date in PAT_ID and the filter is ignored no more.
sorry, I wrote filter on PAT_ID. of course the filter is on PAT_IN
It seems that you are using master item and not a direct expression in chart. Master Item is being treated differently in set analysis. To handle this - you can create a new field in the script with desired date format.
Though I am not very sure if this master item behavior is by-design or a bug.