Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
ggalstyan
Frequent 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(starts with E or T), then TRUE, FALSE.

I might bring more variables later, but now need to make these conditons work

ggalstyan_0-1673398974055.png

Much appreciated!

6 REPLIES 6

Hello, I need to add a condition to an already existing formula:

 

Where Form submitted = 1 AND BOR date = 0 it should calculate days between Form submitted on and today.

 

IF('PRC Change Management Pipeline List'[Number Form Submitted on]=1,IF('PRC Change Management Pipeline List'[Number BOR updated date number]=1,CALCULATE(COUNTROWS('Calendar'),FILTER('Calendar',WEEKDAY('Calendar'[Date],2)<6),DATESBETWEEN('Calendar'[Date],'PRC Change Management Pipeline List'[Form Submitted on],'PRC Change Management Pipeline List'[BOR updated date]-1))))
 
Your help will be greatly appreciated 🙂
amitchandak
Super User
Super User

@ggalstyan , Based on what I got

new column =

var _cnt = countx(filter(Table,[eventnumber] = earlier([eventnumber])  && ( left([unit],3) = "BLA" || left([unit],2) = "RA") && [Entry Time] > earlier([Entry Time] ) ),[eventnumber])

return

if(isblank(_cnt), "No", "Yes")

 

Earlier, I should have known Earlier: https://youtu.be/CVW6YwvHHi8

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak 

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
ggalstyan_0-1673459078730.png

and for eventnumber 23001414 it should ideally return n/a as there were no RA/BLS added to this call at all.

Thanks

 

@ggalstyan ,
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak 

EVENTNUMBERUNITDISPATCHRA/BLS added afterwardscommnets
23001414T211/6/2023 08:26:26No RA/BLS 
23001413BLS271/6/2023 08:27:20Yesas it was added after 08:25:39 
23001413E271/6/2023 08:27:14  
23001413BLS261/6/2023 08:26:15Yesas it was added after 08:25:39 
23001413BLS211/6/2023 08:25:39Noit was right at08:25:39
23001413T261/6/2023 08:25:39  
23001412T261/6/2023 08:15:57No RA/BLS 
23001410BLS291/6/2023 08:12:47Yesas it was added after 08:12:37 
23001410E291/6/2023 08:12:37  
23001405BLS261/6/2023 07:31:16No 
23001405E261/6/2023 07:31:16  
23001400BLS221/6/2023 06:47:52No 
23001400E221/6/2023 06:47:52  

@amitchandak @Thanks I Will try this tomorrow and let you know if works: I believe I understand the concept now.

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.