cancel
Showing results for 
Search instead for 
Did you mean: 

conditional display

aidan_mulcahy
Active Participant
0 Kudos

Hi All,

New to BW.....

is it possible to NOT display fields depending on the result of an attribute?

i.e. for simplicity say

contract status field has two possible entries: 1. 'completed' or 2. 'open'.

I want to always display certain data, say customer number, no matter what the status is. But if the status is 'completed' then I do not want to display the status or the value. So report would be like

cust | status | value

1 | open | 1000

2 | open | 9999

3 | |

4 | open | 8888

where the contract for cust 3 is 'completed'.

Anyone know is this possible?

Thanks,

Aidan.

Accepted Solutions (1)

Accepted Solutions (1)

aidan_mulcahy
Active Participant
0 Kudos

thanks All.

They look like they will do what I want. Not sure where to create these formulae but I will look into it. All part of the learning process, I suppose....

Raj, I tested the programming solution and it worked for the status field. How would I set it for other fields to be blank when the status field is 'completed'?

Thanks,

Aidan.

former_member188975
Active Contributor
0 Kudos

Hi Aidan,

In the query designer, in the structure that you have your key figures, you can right click and create a formula. In the formula builder window you will see key fgiures and variables on the bottom left side. Here you can right click the variables and create new formula variable. Use processing as replacement path and put the char as your Contract Status char, and further set replace by Key. After the variable is created, you can use it in the formula like any other key figures.

Hope this helps...

Former Member
0 Kudos

Aidan,

If you have to change other fields too, that solution will not be effective.. play with other options.

raj

aidan_mulcahy
Active Participant
0 Kudos

All,

that did it. Worked perfectly....Thanks a lot,

Aidan.

aidan_mulcahy
Active Participant
0 Kudos

just to confirm for anyone else who might read this, what I actually did was:

1. created a formula variable as described above

2. created a formula with one entry - Contract Status

3. the contract status I want to display are 0,10,20,30 so I created a condition which only displayed results of the selected fields if the Contract Status was less than 40.

4. Set the property for Contract Status (Key Figure) to 'Always Hide'.

Thanks to all who helped.

Answers (1)

Answers (1)

former_member188975
Active Contributor
0 Kudos

Hi Aidan,

If you filter out the value "Completed" then you will not see any data about Completed in your report, but this will also take away Customer 3 from your report.

You can try the following: Pick up the value of Contract Status in a formula variable. Then in a formula check for the value fo this contract status. If it is 1 (completed) then multiply the value by 0.

Hope this helps...

Former Member
0 Kudos

Hi,

It is possible by the combination of Formula variable with replacement path and conditional Expression.

1) Take the 'contract status' as navigational attribute.

2) create the formula variable up on this navigational attribute with 'replacement path' as the processing and (Say FVar1)

3) use this variable in the Formula column of the query.

4) use one more formula as below for the other column in the query.

( Fvar1 Eq 'contract status' )* 0 + ( Fvar1 Eq 'contract status' )* (Fvar1).

With rgds,

Anil Kumar Sharma .P

Former Member
0 Kudos

If it is in a Workbook, then try this:

1. From your Workbook, press ALT + F11.

2. Place the following code.

3. Save and refresh the workbook.

Sub SAPBEXonRefresh(queryID As String, resultArea As Range)

Dim c as range

For Each c in resultArea.cells

if c.Value = "Completed" then c.Value = " "

Next c

End Sub