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

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.

Reply
miltenburger
Helper V
Helper V

Help with IF statement

Hi people,

 

I need some help with my if statement. 

I need a new column based on following statements (see picture for three different columns right now)* 

 

* "G" = Aantal geboekt <= Uren Gecalculeerd

* "O" = Aantal geboekt <= Uren Gecalculeerd + Uren Risico Opslag & > Uren Gecalculeerd + Uren Risico Opslag

* "R" = Aantal gebpekt > Uren Gecalculeerd + Uren Risico Opslag

newcolumn.png

 

 

Hope you guys can help me out, thanks in advance

 

Kind regards Miltenburger

 

9 REPLIES 9
anandraman
Helper I
Helper I

TryTry this:

 

=IF( Aantal geboekt <= Uren Gecalculeerd ,"G",
IF(Aantal geboekt <= Uren Gecalculeerd + Uren Risico Opslag && Aantal geboekt > Uren Gecalculeerd + Uren Risico Opslag , "O",
IF(Aantal gebpekt > Uren Gecalculeerd + Uren Risico Opslag,"R")))

Thanks @anandraman

I thought this was the solution, but it seems that there are still some wrong calculations in it

 

notgood.png

In addition to this, to orange one doesn't seems te work

Orange.png

 

 

 

Can you please share the PBIX file with this sample data ?

Here is my test data

 

PBIX file

Hi @miltenburger

Please check logic of the second condition above is unclear as @anandraman said. And from your .pbix file, you add SUM(Blad1[Aantal geboekt]), SUM(Blad1[Uren Gecalculeerd]) and SUM(Blad1[Uren Risico Opslag]), please use them in the measure like the following formula.

1.PNG

Best Regards,
Angelia

Hi @v-huizhn-msft and @anandraman, thanks for the reply

 

See the error below: 

 

ERROR.png

 

 

 

I also tried something else, but it only gvies me the "G" value....

error2.png

 

 

 

I think the logic which is to be implemented has some conflict with other one. Please check this once and then try implementing the logic.

Can you please check this condition?

 

* "O" = Aantal geboekt <= Uren Gecalculeerd + Uren Risico Opslag & > Uren Gecalculeerd + Uren Risico Opslag

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.