Skip to Content
0
Former Member
May 06, 2008 at 06:38 AM

calculate percentage with conditions

30 Views

I have two key figures (S1 and I2) with these values for the spesified months:

MTH:____1____2_____3_____4__

S1:_____2____2____________

I2:______4_________________6__

I want to get the relationship between S1 and I2 in percentage. Here is how the result should look like:

MTH:____1____2_____3_____4__

_______50%______________0%_

The rule is:

- if there is values in both key figures, then take S1 %A I1

- If only I1 has values, show "0%"

- if only S1 has value, show a blank cell (not 0%)

- if both are empty, show a blank cell (not 0%)

Is this possible in Query Designer?