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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ACCR
Frequent Visitor

DAX IF ELSE condition returns original text column

Hi guys,

 

I have the column "org unit" that has the names of the org units, in text.

The sum of the org units = total amount of people in there.

 

Basically I need to write a condition where: 

 

- IF the sum of org units < 7 then "H" ELSE "the orignal org unit name"

 

The problem is that while writing a measure, it is not possible to refer to the original column "org unit" at the ELSE step, since it is not a measure. This org unit column only has text. Could you pleaaaase try to help? Thank you.

 

 

 

1 REPLY 1
DOLEARY85
Super User
Super User

You should be able to do this by using Calculate(max in the else part. e.g:

 

Measure = IF(SUM('Table'[SUM ORG UNIT])<7,"H",CALCULATE(MAX('Table'[ORG UNIT])))
 
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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