Forum Discussion

PowerBI123456's avatar
PowerBI123456
Post Partisan
6 years ago
Solved

Excluding based on criteria

Hi, hope this makes sense. But I have a list of claims that can have multiple release dates such as below:

 

Each claim might have an edit associated with it below:

 

 

I want to exclude edits where there are multiple claim releases and if any of those release dates are before 1/1/2020. So the results would be:

 

I am dealing with million + rows. If anyway to do this in power query, that would be preferrable. Thanks!

 

 

 

 

  • PowerBI123456 add a new column in power query using following M code, assuming Jan 01st, 2020 is a fixed date

     

    if [Edit Date] < #date(2020,1,1) then "Yes" else "No"

     

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

    Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.

  • parry2k's avatar
    parry2k
    6 years ago

    PowerBI123456 See attached solution, tweak it as per your need. I hope this will get you going.

     

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

    Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.

7 Replies

  • PowerBI123456 add a new column in power query using following M code, assuming Jan 01st, 2020 is a fixed date

     

    if [Edit Date] < #date(2020,1,1) then "Yes" else "No"

     

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

    Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.

    • PowerBI123456's avatar
      PowerBI123456
      Post Partisan

      parry2k  Thanks, but its not dependent on the edit date. I want to exclude edits where there are multiple claim releases for one particular claim ID and if any of those release dates are before 1/1/2020. Hope that makes sense!