How to for loop in Tableau when you have a combined primary key

262 Views Asked by At

Hi Everybody and thanks in advance to whom will answer my question: I think I need a for loop in tableau and looking for a working around;

my table has the following structure

id, id_detail, result
1      1        fail
1      2        pass
1      3        pass
2      1        pass
2      2        pass
3      1        fail
3      2        pass
...
...

I need to assign to id=1 fail; id=2 pass; id=3 fail

img

do You have any suggestions?

1

There are 1 best solutions below

0
AnilGoyal On

You may use the alphabetic order where pass is greater than fail

create this calculated field

{FIXED [Product ID]: MIN([Test Evaluation])}

and you'll get what you want

enter image description here