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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
karthickpbi
Helper I
Helper I

Power BI Report

Scenario -1

IDDate Name DirectionExpected Result 
1Jul-04AgentOutboundConsider
1Jul-04Customer AInbound 
1Jul-04AgentOutboundConsider
1Jul-04Customer AInbound 

In Scenario 1 , we need to consider One Inbound and One outbound Respectuly. 

 

Scenario-2

IDDateNameDirectionExpected Result
1Jul-04AgentOutboundconsider
1Jul-04Customer AInbound 
1Jul-04Customer AInbound 
1Jul-04Customer AInbound 
1Jul-04AgentOutboundNot consider

In Scenario 2, if we have Multiple Inbound  We nee to consider only One  bound for Respective One Outbound, other wise no need to consider outbound

Scenario-3

IDDateNameDirectionExpected Result
106-07-2004AgentOutboundConsider
106-07-2004Customer AInbound 
106-07-2004Customer AInbound 
105-07-2004Customer AInbound 
104-07-2004AgentOutbound Not consider
104-07-2004AgentOutbound Not consider
104-07-2004AgentOutbound Not consider
104-07-2004Customer AOutboundConsider
103-07-2004Customer AInbound 
103-07-2004Customer AOutboundNot Consider

 

IDDateName DirectionExpected Result
104-07-2004AgentOutboundConsider
103-07-2004Customer AInbound 
102-07-2004Customer AInbound 
101-07-2004Customer AInbound 

 

IDDateName direction Expected Result
104-07-2004Customer AOutboundNot consider
103-07-2004Customer AOutbound Not consider
102-07-2004Customer AOutbound Not consider
101-07-2004Customer AOutbound Not consider

If we need to consider outbound if we have a Inbound in below record , also if we have multiple Inbound and Multiple outbound,

here we need to consider one outbound for respective one inbound.

 

Could you Please check and share us the solution 

 

Thanks in Advance.

1 ACCEPTED SOLUTION
v-yadongf-msft
Community Support
Community Support

Hi @karthickpbi ,

 

In scenario -1, please try following DAX:

Expected Result = SWITCH(
    TRUE(),
    'Scenario -1'[Name]="Agent","Consider"
    )

vyadongfmsft_0-1659577197173.png

 

In scenario -2, Please create an index column from 1 to 5 first, then try following DAX:

Expected Result = SWITCH(
    TRUE(),
    'Scenario-2'[Name] = "Agent" && 'Scenario-2'[Index] = MIN('Scenario-2'[Index]),"Consider",
    'Scenario-2'[Name] = "Agent" && 'Scenario-2'[Index] > MIN('Scenario-2'[Index]),"Not Consider"
)

vyadongfmsft_1-1659577197175.png

 

In scenario -3(1), please try following DAX:

Expected Result = SWITCH(
    TRUE(),
    'Scenario-3(1)'[Direction]="Inbound",BLANK(),
    'Scenario-3(1)'[Name]= "Agent" && 'Scenario-3(1)'[Date]=MAX('Scenario-3(1)'[Date]),"Consider",
    'Scenario-3(1)'[Name]= "Agent" && 'Scenario-3(1)'[Date]<MAX('Scenario-3(1)'[Date]),"Not Consider",
    'Scenario-3(1)'[Name]= "Customer A" && 'Scenario-3(1)'[Date]= MIN('Scenario-3(1)'[Date]),"Not Consider",
    'Scenario-3(1)'[Name]= "Customer A" && 'Scenario-3(1)'[Date]> MIN('Scenario-3(1)'[Date]),"Consider"
)

vyadongfmsft_2-1659577197178.png

 

In scenario -3(2), please try following DAX:

Expected Result1 = SWITCH(
    TRUE(),
    'Scenario-3(2)'[Name]= "Agent" && 'Scenario-3(2)'[Date]=MAX('Scenario-3(2)'[Date]),"Consider"
)

vyadongfmsft_3-1659577197179.png

 

In scenario -3(3), please try following DAX:

Expected Result = SWITCH(
    TRUE(),
    COUNTROWS(FILTER('Scenario-3(3)','Scenario-3(3)'[Direction]="Inbound"))=0,"Not Consider"
)

vyadongfmsft_4-1659577197180.png

 

Best Regards,

Yadong Fang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
karthickpbi
Helper I
Helper I

HI @v-yadongf-msft ,

 

Thanks for your help, the solution is working perfectly.

 

 

 

karthickpbi
Helper I
Helper I

@v-yadongf-msft ,

 

I Implemented the scenario and in some come another scearion is coming up with this 

v-yadongf-msft
Community Support
Community Support

Hi @karthickpbi ,

 

In scenario -1, please try following DAX:

Expected Result = SWITCH(
    TRUE(),
    'Scenario -1'[Name]="Agent","Consider"
    )

vyadongfmsft_0-1659577197173.png

 

In scenario -2, Please create an index column from 1 to 5 first, then try following DAX:

Expected Result = SWITCH(
    TRUE(),
    'Scenario-2'[Name] = "Agent" && 'Scenario-2'[Index] = MIN('Scenario-2'[Index]),"Consider",
    'Scenario-2'[Name] = "Agent" && 'Scenario-2'[Index] > MIN('Scenario-2'[Index]),"Not Consider"
)

vyadongfmsft_1-1659577197175.png

 

In scenario -3(1), please try following DAX:

Expected Result = SWITCH(
    TRUE(),
    'Scenario-3(1)'[Direction]="Inbound",BLANK(),
    'Scenario-3(1)'[Name]= "Agent" && 'Scenario-3(1)'[Date]=MAX('Scenario-3(1)'[Date]),"Consider",
    'Scenario-3(1)'[Name]= "Agent" && 'Scenario-3(1)'[Date]<MAX('Scenario-3(1)'[Date]),"Not Consider",
    'Scenario-3(1)'[Name]= "Customer A" && 'Scenario-3(1)'[Date]= MIN('Scenario-3(1)'[Date]),"Not Consider",
    'Scenario-3(1)'[Name]= "Customer A" && 'Scenario-3(1)'[Date]> MIN('Scenario-3(1)'[Date]),"Consider"
)

vyadongfmsft_2-1659577197178.png

 

In scenario -3(2), please try following DAX:

Expected Result1 = SWITCH(
    TRUE(),
    'Scenario-3(2)'[Name]= "Agent" && 'Scenario-3(2)'[Date]=MAX('Scenario-3(2)'[Date]),"Consider"
)

vyadongfmsft_3-1659577197179.png

 

In scenario -3(3), please try following DAX:

Expected Result = SWITCH(
    TRUE(),
    COUNTROWS(FILTER('Scenario-3(3)','Scenario-3(3)'[Direction]="Inbound"))=0,"Not Consider"
)

vyadongfmsft_4-1659577197180.png

 

Best Regards,

Yadong Fang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.