Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
How can I rewrite this -------
IF(( ("PROJE NO" LIKE '%.S.%' OR "PROJE NO" LIKE '%.s.%' OR "PROJE NO" NOT LIKE '%.%' OR "PROJE NO" IS NULL ) AND "SERVİS TANIM" IS NULL AND "SERVİS TİPİ" IS NULL) THEN [COUNTRY]&"é"&900, ELSE IF[COUNTRY]&"é"&[SALDEPT])--------- in power query with custom column formulas?
Hi, @AKARSEVGI ;
If a dax.
column =
IF (
(
(
CONTAINSSTRING ( [PROJE NO], ".S." ) || CONTAINSSTRING ( [PROJE NO], ".s." )
|| CONTAINSSTRING ( [PROJE NO], "." )
|| [PROJE NO] = BLANK ()
)
&& [SERVİS TANIM] = BLANK ()
&& [SERVİS TİPİ] = BLANK ()
),
[COUNTRY] & "é" & "900",
[COUNTRY] & "é" & [SALDEPT]
)If in power query.
=if (Text.Contains([PROJE NO],".s.") || Text.Contains([PROJE NO],".S.") || Text.Contains([PROJE NO],".")
|| [PROJE NO] = null )
&& [SERVİS TANIM] = null
&& [SERVİS TİPİ] = null
then [COUNTRY] & "é" & "900"
else [COUNTRY] & "é" & [SALDEPT]Best Regards,
Hey @AKARSEVGI !
You can use the 'not Text.Contains' to check the values. Create a new column to recieve checked value.
The basis is:
Table.AddColumn(#"Added Conditional Column", "Custom", each if not Text.Contains([Status], "S.") then "Country" else if not Text.Contains([Status], "s.") then "Country" else "Another information")
** If this post helps, please consider accept as solution to help other members find it more quickly.
Regards
Marcel Magalhaes
Regards,
Marcel Magalhães
Microsoft Power BI Official Partner
MCT | Certified PL-300 Power BI
Power Query uses small letters
IF => if
IS NULL => = null
AND => and
etc.
Power Query does not have a concept of "LIKE" - you need to write that manually.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 38 | |
| 36 | |
| 29 | |
| 28 |
| User | Count |
|---|---|
| 126 | |
| 88 | |
| 78 | |
| 66 | |
| 65 |