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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
smpa01
Community Champion
Community Champion

Conditional Copy

I have two Lookup activity that returns following two values

 

//Lookup 1
{
	"firstRow": {
		"NewWatermarkvalue": "2024-07-20T00:30:13Z"
	}
}

//Lookup2
{
	"count": 1,
	"value": [
		{
			"OldWatermark": "1900-01-01T00:00:00Z"
		}
	]
}

 

 

I want to create a IF condition where new>old then do something else do nothing.

 

I wrote this expression

 

@greater(activity('Lookup2').output.firstRow.NewWatermarkvalue,activity('Lookup1').output.value[0].OldWatermark)

 

 

But it did not ingest a single row even though it evaluated for 40 min, probably because the if expression is not correct as the evaluation of if does not result to anything.

 

What am I doing wrong here?

 

Thank you in advance.

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @smpa01 ,

 

In Data Factory, IF conditional expressions should use the correct JSON paths and functions to ensure that the comparison operation is correct.

Try to modify your formula like below:

@greater(activity('Lookup1').output.firstRow.NewWatermarkvalue, activity('Lookup2').output.value[0].OldWatermark)

 

Refer to below document:

If Condition activity - Microsoft Fabric | Microsoft Learn

 

Best Regards,
Adamk Kong

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @smpa01 ,

 

In Data Factory, IF conditional expressions should use the correct JSON paths and functions to ensure that the comparison operation is correct.

Try to modify your formula like below:

@greater(activity('Lookup1').output.firstRow.NewWatermarkvalue, activity('Lookup2').output.value[0].OldWatermark)

 

Refer to below document:

If Condition activity - Microsoft Fabric | Microsoft Learn

 

Best Regards,
Adamk Kong

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
December Fabric Update Carousel

Fabric Monthly Update - December 2025

Check out the December 2025 Fabric Holiday Recap!

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.