I have a table of the form
id case status
0 151 xx
0 528 yy
0 454 yy
1 ... ..
15 ... ...
...
I am trying to code in DAX something like:
IF id is the same and at least 1 case has status = xx THEN all cases for id = 0 will be xx.
Any help on this?
UPDATE
This works but actually sorry my table is a bit different, didn't give the right example.
My table is more like the belos:
id case status
0 1 xx
0 555 yy
0 125 zz
2 87 yy
2 nn xx
The logic is more like:
for every id if 1 case has status xx and 1 case has status yy, THEN I want yy = xx
So the resulting table would be
id case status
0 1 xx
0 555 **xx**
0 125 zz
2 87 **xx**
2 nn xx
So i don't want all of the status per id to be transformed into xx, but only some of them depending on conditiions.
Thanks
I have a table of the form
id case status
0 151 xx
0 528 yy
0 454 yy
1 ... ..
15 ... ...
...
I am trying to code in DAX something like:
IF id is the same and at least 1 case has status = xx THEN all cases for id = 0 will be xx.
Any help on this?
UPDATE
This works but actually sorry my table is a bit different, didn't give the right example.
My table is more like the belos:
id case status
0 1 xx
0 555 yy
0 125 zz
2 87 yy
2 nn xx
The logic is more like:
for every id if 1 case has status xx and 1 case has status yy, THEN I want yy = xx
So the resulting table would be
id case status
0 1 xx
0 555 **xx**
0 125 zz
2 87 **xx**
2 nn xx
So i don't want all of the status per id to be transformed into xx, but only some of them depending on conditiions.
Thanks
Share Improve this question edited Mar 5 at 15:49 Roberto92 asked Mar 4 at 13:42 Roberto92Roberto92 334 bronze badges1 Answer
Reset to default 0you can try this to create a column
Column=
IF (
MAXX (
FILTER (
'Table',
'Table'[id] = EARLIER ( 'Table'[id] )
&& 'Table'[status] = "xx"
),
'Table'[status]
) = "",
"",
"xx"
)
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745040437a4607778.html
评论列表(0条)