How to display result of a row in column in Tableau desktop

77 Views Asked by At

I have a table :

id field_name control_number typologie NB1 NB2
SUSY FIELDX1 RG-FI-03 P 00 36
SUSY FIELDX1 RG-FI-04 N 12 46

I want to create a column to display the result of NB1 when typologie is equal to "N" in order to have :

id field_name control_number typologie NB1 NB2 NBIF
SUSY FIELDX1 RG-FI-03 P 00 36 12
SUSY FIELDX1 RG-FI-04 N 12 46 12
1

There are 1 best solutions below

0
On

Not that difficult as it seems..

Assuming that you have to replicate this typology for each id as a group.. create a calculated field NBIF with the following calculation

{Fixed [Id] : min(
IF [Typologie] = "N" THEN [NB1] END
)}

If however, your group/level of detail is field_name replace [Id] with [field_number] in the above formula and your field is ready

enter image description here