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.
Hi guys,
Is there any easy way to dax the following statement?
I want to cleate a column which will flag with "1" if the text of the value in "Project Name" column contains the word "RFR"
Is that doable?
Solved! Go to Solution.
Hey @harrinho,
Sure it is, just add a new column using a conditional over the SEARCH funcion with a return 0 if it doesn't find it:
RFRTest = VAR n = SEARCH ( "RFR", [Project Name],, 0 ) RETURN IF ( n > 0, 1, 0 )
Or, if you want to play it smart and not use a conditional:
RFRTest = VAR n = SEARCH ( "RFR", [Project Name],, 0 ) RETURN n / ( ABS ( n - 1 ) + 1 )
Hey @harrinho,
Sure it is, just add a new column using a conditional over the SEARCH funcion with a return 0 if it doesn't find it:
RFRTest = VAR n = SEARCH ( "RFR", [Project Name],, 0 ) RETURN IF ( n > 0, 1, 0 )
Or, if you want to play it smart and not use a conditional:
RFRTest = VAR n = SEARCH ( "RFR", [Project Name],, 0 ) RETURN n / ( ABS ( n - 1 ) + 1 )
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
99 | |
82 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |