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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hello everyone,
I need help with a conditional column. I have a column with weekday (0-6) and shift number (1-3). The conditional column currently makes the distinction between week and weekend so it writes weekday 5 and 6 in the new column weekend. Now I would also like to add weekday 4, but only shift 3 to the conditional column. Unfortunately, I can't find an option with a double condition. Can anyone help me with this problem?
Best regards
Johannes
Solved! Go to Solution.
In your FILTER, you can use && to have 2 different filter conditions:
VAR WorkingDayShift =
FILTER( ALL (Date ),
'Date'[Working Day] = 1 && 'Date'[Shift Number] = 3
)
In your FILTER, you can use && to have 2 different filter conditions:
VAR WorkingDayShift =
FILTER( ALL (Date ),
'Date'[Working Day] = 1 && 'Date'[Shift Number] = 3
)
The Code of the conditional column is = Table.AddColumn(#"Hinzugefügte benutzerdefinierte Spalte", "Tagestyp", each if [#"Wochentag Nr."] = 5 then "Wochenende" else if [#"Wochentag Nr."] = 6 then "Wochenende" else "Woche") Can you explain me, how to put the code in correctly?
The code I was showing was for a Calculated Column. The code you are showing is for M code (In Power Query). Is that where you want the column?
Yes, PowerQuery would be perfect, the column should just change these few cells to "Weekend" if the Date Number = 4 and Shfit No = 3.
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 64 | |
| 51 | |
| 46 | |
| 23 | |
| 19 |
| User | Count |
|---|---|
| 139 | |
| 112 | |
| 51 | |
| 33 | |
| 29 |