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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
JohannesBier
Helper I
Helper I

Conditional column

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

1 ACCEPTED SOLUTION
Anonymous
Not applicable

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
)

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

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?

Anonymous
Not applicable

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.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.