I don't have those formulas in yet, so the qvw in its current state would not tell you much.
What I want to do - I have done this already, but then I was loading data from an Excel report whereas now I am querying the database itself.
- There are several areas in our company for which I want to display presence_quotas.
- In the "old version", I was loading from an Excel report which had the figures for every one of those areas
=> The challenge then was merely which of them to display.
=> I solved this by adding several clones of the same formula in the diagram, each one of which would be displayed when a variable I had for the purpose had a specific value.
=> This variable was defined by user_selections in two different selection_boxes, connected by 'AND'.
=> I want to do the same now and the current step is merely getting the variable right. It's going to become much more complex, but once I have it working in a basic form, that will do. However, it doesn't work yet.
I knocked something up briefly - see attached. I think the issue was with the GetCurrentSelections, which seems to be returning all your selections (see top right box in example), thus as a piece of logic it fails.
I've replaced this in your formula with only - see the second box. This seems to work.
Let me know how you get on and whether or not this is the correct answer.
Datanibbler.qvw 146.2 K
Are you confusing getcurrentselections with getfieldselections? The getcurrentselections function doesn't accept field names as parameter.
Also if you select only one value you don't need the getfieldselections function. The only function will do:
IF(((only(Werk) = 64) AND (TRIM(only(Bereich)) = 'Staplerstrg')), 'SS_64', 'ges')