4 Replies Latest reply: Dec 4, 2015 11:37 AM by Blerta Deliallisi

# How to conditionally show a row of a straight table depending on whether the value of field/column X equals the value of one of four other fields (columns)?

Hello,

I want to built a straight table but for the moment I have rows in my straight table which I do not want to be visible. I would like to keep only the rows where the value of the department field is equal to the value of field "Level 1" OR "Level 2" OR "Level 3" OR "Level 4".

Please take a look at the attached QVW example for better understanding of the question.

_Koen

Message was edited by: Koen Bal

• ###### Re: How to only show a row in a straight table if the value of a field is equal to the value of one of 4 other fields?

Change Department to a calculated dimension: =if(match(Department,[Level 1],[Level 2],[Level 3],[Level 4]),Department)

And check the option Suppress When Value Is Null for the new calculated dimension. Does that do what you want?

• ###### Re: How to only show a row in a straight table if the value of a field is equal to the value of one of 4 other fields?

Hi Gysbert,

Yes the suggested solution solves my problem, again thanks for your input.

I added a solution qvw with a more detailed explanation for future readers of the post.

_Koen

• ###### Re: How to only show a row in a straight table if the value of a field is equal to the value of one of 4 other fields?

hi check the attach file

• ###### Re: How to conditionally show a row of a straight table depending on whether the value of field/column X equals the value of one of four other fields (columns)?

For this case in order not to create extra dimension and hide it. Another similar solution, since this table has only one expression is to modify the expression to

=if(match(Department,[Level 1] ,[Level 2] ,[Level 3] ,[Level 4]), sum([# of hours]))

So you calculate it and show only the rows when this condition is met