Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a chart with the date as dimension and a COUNT(DISTINCT) as expression.
=> The tricky thing is, I need to display two values and a quota out of these two
- One of those values is available every day (so it is there for today)
- The other is available only up to yesterday
=> That would give me a quota of 100% for "today" which is false.
=> To avoid that, I have to block the display for "today"
=> To that end, I have a set_expression in my formula that looks something like this
>>> {$<%Date < TODAY>} <<<
<=> That set_expression works fine - but, what I didn't realize until now just because I never tested it - is that it seems to block regular user_selections on that same date_field >> %Date << - when I select only one day on that field, the expression where I have that set_expression does not react, only the other one where I don't have it - which is again wrong 😉
Can somebody help me here?
Thanks a lot!
Best regards,
DataNibbler
May be you can try like:
%Date={"<$(=TODAY())"}
Hi Tresesco,
no, unfortunately that doesn't work.
I had that set_expression slightly bigger, but yours works just the same - in this case, though, the result is the same:
- The formula works and the value for "today" is not displayed.
<=> When I select CW 50 and then I select just Dec13 (Fri), still the whole week is displayed.
Could please post a sample with expected output described?
{$<%Date < TODAY>}
is not a valid set expression. You can't use a comparison operator like < in a field modifier.
Besides this, what is TODAY? A field? A variable?
Hi,
that set_expression in my first post was just an example. As I said, the real one does work insofar as the value for "today" (a variable) is not displayed.
@ tresesco
I am trying to put together a sample - for some reason, now I get a value for every day of this week - there should be no values for the rest of the week, though...
Hi,
I think now I've made it. I'll attach
- an Excel file with some fake personell_data
- a qvw to display the presence_quota
As you see, sickness_data is not available for "today", only presence_data is available -> so I get a presence_quota of 100% for "today" which would be wrong
=>´To avoid that, I introduced that set_expression to display the values only up to "yesterday"
<=> That now seems to block any regular user_selections on that date_field.
Hi,
seems I've made it.
Reading up on "set operators", I realized what I should be using: The "-=" operator.
I ended up with this formula (irritatingly, it is nearly all underlined in the editor, but it says "Expression ok", and it seems to be working:
>>> COUNT({$<%Datum -= {'16.12.2013'}>} DISTINCT Pers_Nr5) <<<
I only now have to dynamize today's date. But the effect is what I wished for: The user can select any one day from the week before - but the value is not displayed for today.
Best regards,
DataNibbler
Have you already tried using a dollar sign expansion similar to what tresesco suggested above?
COUNT({$<%Datum -= {'$(=today())'}>} DISTINCT Pers_Nr5)
Hi swuehl,
yes, I have.
It seems to be working now.
Thank you all!
Best regards,
DataNibbler