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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
LD1
Helper III
Helper III

if text contains DAX

Hi everyone, 

 

In my research i saw different formulas but none of them match with mine.

Here, you can see what I tri to figure it out : 

 

Measure = IF( CONTAINS('Origine de vente retraitée','Origine de vente retraitée'[Pole/Zone retraité],"ZONE"), "DCL",'Origine de vente retraitée'[Pole/Zone retraité] )
 
Data type : Text (?)
 
Please, can you help me to solve this issue ? 
Thank you so much in advance !
 
Have a good day
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi, @LD1 

You can try the measure to solve the problem. If it doesn't work, you can check if the solution linked below meets your needs.

Measure:

 

Measure = IF(
    SEARCH("ZONE", 'Origine de vente retraitée'[Pole/Zone retraité], 1, BLANK()) <> BLANK(),
    "DCL",
    'Origine de vente retraitée'[Pole/Zone retraité]
)

 

Related link: Solved: DAX If field contains text - Microsoft Fabric Community 

 

If this does not work, could you please share some sample data without sensitive information and expected output.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi, @LD1 

You can try the measure to solve the problem. If it doesn't work, you can check if the solution linked below meets your needs.

Measure:

 

Measure = IF(
    SEARCH("ZONE", 'Origine de vente retraitée'[Pole/Zone retraité], 1, BLANK()) <> BLANK(),
    "DCL",
    'Origine de vente retraitée'[Pole/Zone retraité]
)

 

Related link: Solved: DAX If field contains text - Microsoft Fabric Community 

 

If this does not work, could you please share some sample data without sensitive information and expected output.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

bhanu_gautam
Super User
Super User

@LD1 , Please try this one 

 

Measure =
IF (
CONTAINS (
VALUES ('Origine de vente retraitée'[Pole/Zone retraité]),
'Origine de vente retraitée'[Pole/Zone retraité],
"ZONE"
),
"DCL",
'Origine de vente retraitée'[Pole/Zone retraité]
)

 

Please accept as solution and give kudos if it helps




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.