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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I have two columns:
Start Date End Date
a a1
b b1
c c1
d d1
My condition is to compare the two columns as follows:
if ( b>a1)
Yes - I should increment the no of comparisions - if (c>a1) & if (c>b1) and goes on if the condition is yes again.
No - another condition.
Kindly let me know on how to solve this.
Any help would be appreciated.
Thanks,
Anand
Hi Anand_
I am not clear about your problem, did you want to create another column to show Yes or No based on the condition?
Start Date End Date new column
a a1 Y (a>a1)
b b1 Y (b>a1 )
c c1 N (c>a1, c<b1)
d d1 Y (d> a1,d>b1,d>c1)
If not, please inform me more detailed ifnormation(such as your other conidtion, and your expected output)? Then I will help you more correctly.
Please do mask sensitive data before uploading.
Thanks for your understanding and support.
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for your reply.
So, I have a number - 'x' .
Start Date End Date
a a1 if (b<a1)
b b1 Y - if (c<a1 && c<b1) [N - a1 is eliminated and begins with next set - If ( c<b1)]
c c1 Y - if (d<a1 && d<b1 && d<c1) [N - Smallest (a1 or b1 - Let's say a1) is eliminated - if (d<b1 &&d<c1)]
d d1 Y - and so on..
If No - the condition starts from the beginning with the smallest end dates set (both a and a1) getting eliminated.
My expected result would be the difference between a start date and another date.
I would stop the loop and give the result (difference) when I get 'x' - Yess'.
I know it's a bit confusing but any help is much appreciated.
Thanks!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!