Check for duplicate values within 2 months from the date the data is entered into the system.
I want to check for duplicate values with the following rule: if date is 1/1/2019 (d/m/y) => "No", 1/3/2019 => "Yes", 2/3/2019 => "No", 1/4/2019 => "Yes". In short, check the duplicate before 59 days (about 2 months) from the current date. In excel, I use this formula IF(COUNTIFS($A$2:A2,">="&(A3-59),$B$2:B2,[@Number],$C$2:C2,"No")>0, "Yes","No") but I can't figure it out in Power BI or SQL. I look forward to receiving the solutions from all of you. Many thanks.
Data is considered "New" labeled "No" because it has been more than 2 months (59 days) after the day it was entered into the system (2019/01/01).
No, the column and data are sufficient. I can solve it in Excel using the aforementioned formula, but I'm at a loss in Power BI and SQL.
Take a look at the September 2023 Power BI update to learn more.
Join Microsoft Reactor and learn from developers.
Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!