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

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

Reply
JamesMoody
Frequent Visitor

Custom Column with multiple if statements

I am wanting to add a column to my data to determine when a call is abandoned. Here is my currrent formula and the result I am getting.

 

Formula:  Column = IF('Table1'[Participant] = "agent", IF('Table1'[Segment] <> "interact", "Abandoned"))

 

Current Result:

Record IDParticipantSegmentCurrent Result
1agentalertAbandoned
1ivrivr 
1acdinteract 
1acddelay 
1customerinteract 
2agentwrapupAbandoned
2agentinteract 
2agentalertAbandoned
2acdinteract 
2acddelay 
2ivrivr 
2customerinteract 

 

I would like the result to be as per below - only counting records as Abandoned if one of the participants is an 'agent' and there is only the one segment for 'alert'

 

Expected Result:

Record IDParticipantSegmentExpected Result
1agentalertAbandoned
1ivrivr 
1acdinteract 
1acddelay 
1customerinteract 
2agentwrapup 
2agentinteract 
2agentalert 
2acdinteract 
2acddelay 
2ivrivr 
2customerinteract 
1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

 

Jihwan_Kim_0-1710291804500.png

 

 

Expected Result CC =
VAR _recordid = Table1[Record ID]
VAR _list =
    CALCULATETABLE (
        Table1,
        Table1[Record ID] = _recordid,
        Table1[Participant] = "agent",
        Table1[Segment] <> "alert"
    )
RETURN
    IF ( COUNTROWS ( _list ) = 0 && Table1[Segment] = "alert", "Abandoned" )

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

 

Jihwan_Kim_0-1710291804500.png

 

 

Expected Result CC =
VAR _recordid = Table1[Record ID]
VAR _list =
    CALCULATETABLE (
        Table1,
        Table1[Record ID] = _recordid,
        Table1[Participant] = "agent",
        Table1[Segment] <> "alert"
    )
RETURN
    IF ( COUNTROWS ( _list ) = 0 && Table1[Segment] = "alert", "Abandoned" )

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Thanks, this solved my issue!

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.