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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
smpa01
Super User
Super User

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

June FBC25 Carousel

Fabric Monthly Update - June 2025

Check out the June 2025 Fabric update to learn about new features.

Top Solution Authors