Forum Discussion
ggalstyan
3 years agoFrequent Visitor
multiple ifs with multiple conditions
Hello everyone, I am trying to solve the following issue with multiple ifs and conditions if eventnumber=eventnumber and unit's(starts with BLS or RA) dispatch time is after unit's dispatch time(st...
ggalstyan
3 years agoFrequent Visitor
I got the yes and no but the out come is incorrect, I need more help please
RA/BLS added afterwards =
var _cnt=COUNTX(FILTER(URPT,[EVENTNUMBER]=EARLIER(URPT[EVENTNUMBER]) &&(LEFT(URPT[UNIT],3)="BLS" ||LEFT(URPT[UNIT],2)="RA") &&[DISPATCH].[Date]>EARLIER(URPT[DISPATCH].[Date])),URPT[EVENTNUMBER])
return
IF(ISBLANK(_cnt),"No","Yes")
For the followig I was excpecting yellows to be yes and blue to be no
and for eventnumber 23001414 it should ideally return n/a as there were no RA/BLS added to this call at all.
Thanks
amitchandak
3 years agoSuper User
ggalstyan ,
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
- ggalstyan3 years agoFrequent Visitor
EVENTNUMBER UNIT DISPATCH RA/BLS added afterwards commnets 23001414 T21 1/6/2023 08:26:26 No RA/BLS 23001413 BLS27 1/6/2023 08:27:20 Yes as it was added after 08:25:39 23001413 E27 1/6/2023 08:27:14 23001413 BLS26 1/6/2023 08:26:15 Yes as it was added after 08:25:39 23001413 BLS21 1/6/2023 08:25:39 No it was right at08:25:39 23001413 T26 1/6/2023 08:25:39 23001412 T26 1/6/2023 08:15:57 No RA/BLS 23001410 BLS29 1/6/2023 08:12:47 Yes as it was added after 08:12:37 23001410 E29 1/6/2023 08:12:37 23001405 BLS26 1/6/2023 07:31:16 No 23001405 E26 1/6/2023 07:31:16 23001400 BLS22 1/6/2023 06:47:52 No 23001400 E22 1/6/2023 06:47:52