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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
InsightSeeker
Helper III
Helper III

Need help with measure

I treid creating the below measure but i am not getting the desired results.

 

If Table 1 InterDomestic is "Outbound" or "Regional" or "International" return "International"

If Table 1 InterDomestic is "Inbound" or "Domestic" return "Domestic"

 

IntDom =
VAR _InterDomesticValue = SELECTEDVALUE('Table1'[InterDomestic])
RETURN
IF(_InterDomesticValue = "Domestic", "Domestic",
IF(_InterDomesticValue = "Inbound", "Domestic",
IF(_InterDomesticValue = "Outbound", "International",

IF(_InterDomesticValue = "International", "International",
IF(_InterDomesticValue = "Regional", "International"
,"International"))))

 

InterDomestic
Outbound
Outbound
Outbound
Domestic
Regional
Inbound
Inbound
Inbound
Inbound

 

Result

 

InterDomesticresult
OutboundInternational
OutboundInternational
OutboundInternational
DomesticDomestic
RegionalInternational
InboundDomestic
InboundDomestic
InboundDomestic
InboundDomestic

 

2 ACCEPTED SOLUTIONS
rajendraongole1
Super User
Super User

Hi @InsightSeeker - Use the below measure, this checks if the value of "InterDomestic" is "Outbound", "Regional", or "International". If it is, it returns "International", otherwise, it returns "Domestic".

 

IntDom =
VAR _InterDomesticValue = SELECTEDVALUE('Table1'[InterDomestic])
RETURN
IF(
_InterDomesticValue = "Outbound" ||
_InterDomesticValue = "Regional" ||
_InterDomesticValue = "International",
"International",
"Domestic"
)

 

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

Anand24
Super User
Super User

Hi @InsightSeeker ,
Use below DAX in a calculated measure:
Result = 
SWITCH(
    TRUE(),
    MAX(TableName[InterDomestic]) IN {"Outbound", "Regional", "International"}, "International",
    MAX(TableName[InterDomestic]) IN {"Inbound", "Domestic"}, "Domestic"
)

Output:

Anand24_0-1717438432612.png

 

View solution in original post

4 REPLIES 4
Anand24
Super User
Super User

Hi @InsightSeeker ,
Use below DAX in a calculated measure:
Result = 
SWITCH(
    TRUE(),
    MAX(TableName[InterDomestic]) IN {"Outbound", "Regional", "International"}, "International",
    MAX(TableName[InterDomestic]) IN {"Inbound", "Domestic"}, "Domestic"
)

Output:

Anand24_0-1717438432612.png

 

rajendraongole1
Super User
Super User

Hi @InsightSeeker - Use the below measure, this checks if the value of "InterDomestic" is "Outbound", "Regional", or "International". If it is, it returns "International", otherwise, it returns "Domestic".

 

IntDom =
VAR _InterDomesticValue = SELECTEDVALUE('Table1'[InterDomestic])
RETURN
IF(
_InterDomesticValue = "Outbound" ||
_InterDomesticValue = "Regional" ||
_InterDomesticValue = "International",
"International",
"Domestic"
)

 

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





bevicor
Regular Visitor

Does it have to be a measure? I think your DAX will work if you make a calculated column instead of a measure and just change it slightly.

 

IntDom =
VAR  InterDomesticValue = 'Table1'[InterDomestic]
RETURN
IF(_InterDomesticValue = "Domestic", "Domestic",
IF(_InterDomesticValue = "Inbound", "Domestic",
IF(_InterDomesticValue = "Outbound", "International",

IF(_InterDomesticValue = "International", "International",
IF(_InterDomesticValue = "Regional", "International"
,"International"))))

@bevicor I don't want to create a calculated column; instead, I would prefer to achieve it via a measure. Is it possible?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.