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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Flo95
Frequent Visitor

IF Funktion

Hallo zusammen,

 

weiß jemand wie ich eine einfache Wenn, Dann Funktion mit Text in Power Bi nachbauen kann?

Flo95_1-1704974346655.png

Vielen Dank für eine Rückmeldung!

 

Viele Grüße,

Florian 

 

2 ACCEPTED SOLUTIONS

Hallo @Flo95 

Sie sollten eine Spalte mit dem folgenden DAX erstellen und diese in der Tabelle verwenden.

Dunning Level 1 = if(Rep Order_YES/No = 'Ja', Rep_Order_WA_Date + 10, blank())

Stellen Sie sicher, dass die Spalte „Rep_Order_WA_Date“ den Datentyp „Datum“ hat.

Lassen Sie mich wissen, ob das hilft.

Wenn dieser Beitrag hilfreich ist, denken Sie bitte darüber nach, ihn als Lösung zu akzeptieren, damit die anderen ihn schneller finden können.

View solution in original post

v-weiyan1-msft
Community Support
Community Support

Hi @Flo95 ,

 

From the screenshot you provided, it looks like you are selecting Add a custom column in Power Query.

And as @NaveenGandhi mentioned about the dax formula, this formula applies to calculated column.
My Sample:

vweiyan1msft_0-1706348005159.png

Result is as below.

vweiyan1msft_3-1706348193922.png

In addition, you could also consider using the Switch() function, the code is as follows.

Dunning Level 2 = SWITCH('Table'[Rep Order_YES/No],
                         "Ja",'Table'[Rep_Order_WA_Date] + 10)

Result is as below.

vweiyan1msft_2-1706348062671.png

For more you may refer to:

Tutorial: Create calculated columns in Power BI Desktop - Power BI | Microsoft Learn

 

Best Regards,
Yulia Yan

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
v-weiyan1-msft
Community Support
Community Support

Hi @Flo95 ,

 

From the screenshot you provided, it looks like you are selecting Add a custom column in Power Query.

And as @NaveenGandhi mentioned about the dax formula, this formula applies to calculated column.
My Sample:

vweiyan1msft_0-1706348005159.png

Result is as below.

vweiyan1msft_3-1706348193922.png

In addition, you could also consider using the Switch() function, the code is as follows.

Dunning Level 2 = SWITCH('Table'[Rep Order_YES/No],
                         "Ja",'Table'[Rep_Order_WA_Date] + 10)

Result is as below.

vweiyan1msft_2-1706348062671.png

For more you may refer to:

Tutorial: Create calculated columns in Power BI Desktop - Power BI | Microsoft Learn

 

Best Regards,
Yulia Yan

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Flo95
Frequent Visitor

Hallo @NaveenGandhi 

In Excel würde die Formel korrekt so aussehen:

Flo95_0-1704976117424.png

 

Flo95
Frequent Visitor

Hallo Naveen,

 

vielen Dank für deine Rückmeldung

 

Hier das Beispiel:

 

Ich habe eine Tabelle mit Spalte "Rep Order_JA/Nein" - Diese Spalte ist entweder mit Ja oder mit Nein befüllt.

 

Sofern eine Zeile mit "Ja" befüllt ist, soll eine separate Spalte "Dunning Level 1" ergänzt werden, bei welcher die Spalte "Rep_Order_WA_Date" + 10 Tage gerechnet werden soll. - wenn "Nein" dann soll die Zeile leer bleiben.

Hier das Beispiel ohne Datenbefüllung:

Rep_Order_WA_DateMonatRep Order _JA/NEINDunning Level 1
31.10.20232023-11Ja 
 2023-11Nein

 

Hallo @Flo95 

Sie sollten eine Spalte mit dem folgenden DAX erstellen und diese in der Tabelle verwenden.

Dunning Level 1 = if(Rep Order_YES/No = 'Ja', Rep_Order_WA_Date + 10, blank())

Stellen Sie sicher, dass die Spalte „Rep_Order_WA_Date“ den Datentyp „Datum“ hat.

Lassen Sie mich wissen, ob das hilft.

Wenn dieser Beitrag hilfreich ist, denken Sie bitte darüber nach, ihn als Lösung zu akzeptieren, damit die anderen ihn schneller finden können.

Hallo @NaveenGandhi 

 

so:

 

Flo95_0-1704977832767.png

 

Nimmt es mir leider nicht...

 

Danke und Grüße,

Florian

NaveenGandhi
Super User
Super User

Hallo @Flo95 

Können Sie Beispieldaten und Beispielausgaben bereitstellen, damit Sie leicht helfen können?

Danke,
Naveen

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.