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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
StevieCho
Regular Visitor

DAX : If then else...

I'm sorry, I'm coming here with what must be a very stupid question. I am still a newcomer to PowerBI.

 

The following facts:

First Test (IF) :
Are the hours equal to or above 13
If NO : Give the hours entered
If YES :
Second test (IF) :
If the field has a trigger (=1), If YES :
Give the entered hours, if NO : Write 13

 

Since there is probably no If then else in the DAX, it is...at least for me, a bit more complicated. 

 

Thanks in advanced 🙂

 

 

1 ACCEPTED SOLUTION
Idrissshatila
Super User
Super User

Hello @StevieCho,

 

you need to fill the hours column and the triger column in the measure:

Column = if( hours >= 13,If(trigger = 1,hours,13),hours)

 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

 

Follow me on Linkedin



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




View solution in original post

4 REPLIES 4
StevieCho
Regular Visitor

Thank you Guys, i'll ty it later 🙂

Idrissshatila
Super User
Super User

Hello @StevieCho,

 

you need to fill the hours column and the triger column in the measure:

Column = if( hours >= 13,If(trigger = 1,hours,13),hours)

 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

 

Follow me on Linkedin



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Thank you, you helped my 🙂 the dax formula is now :

 

Permanence calculée (NET) = IF (Imp_SQL_Conga[Permanence calculée (BRUT)]>=13, If(Imp_SQL_Conga[Trigger Weekend/Feriée] = 1,Imp_SQL[Permanence calculée (BRUT)],13),Imp_SQL[Permanence calculée (BRUT)])
 
Mahesh0016
Super User
Super User

@StevieCho Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

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.