Forum Discussion
SN1900
7 years agoFrequent Visitor
IF formular
Hello all, I have an issue with an IF formular as I do not now how i can build the if formular in Power BI as I am quite new in Power BI. I have two different columns from two data fields w...
- 7 years ago
Hi SN1900
Please see the below.
Column = VAR x = ( CALCULATE( MAX( Event[Event Date NEW UTC] ), Event[STATUS] = "DELIVERED" ) - Delivery[Delivery Appointment DATE] ) * 1 RETURN SWITCH( TRUE, x = 0, "On Time", x > 0, "Late", "Early" )Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
SN1900
7 years agoFrequent Visitor
Hi Mariusz,
The relationship between the tables is a shipment ID number.
There is one Delivery Appointment date. So one ID number has one delivery appointment date.
But every ID nummber can have multiple event date based on the Status code.
I want to compare the Delivery appointment date only with the Event date that has the Status code delivered to see which ones are delivered on time and which not.
Mariusz
7 years agoCommunity Champion
Hi SN1900
Please see the below.
Column =
VAR x = (
CALCULATE(
MAX( Event[Event Date NEW UTC] ),
Event[STATUS] = "DELIVERED"
) - Delivery[Delivery Appointment DATE]
) * 1
RETURN
SWITCH(
TRUE,
x = 0, "On Time",
x > 0, "Late",
"Early"
)Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.

Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.