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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Help! Measure for the following condition -

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

2 REPLIES 2
dax
Community Support
Community Support

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.

Anonymous
Not applicable

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!

 

 

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors