简体   繁体   中英

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

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

图片

do You have any suggestions?

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

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM