Forum Discussion

Spigaw's avatar
Spigaw
Helper III
4 years ago

Keeping data based on export date and unique occurrences

Hello everyone,

 

I have to create a report via Power Query which has a technical difficulty that I seem incapable to work around. The ERP we use flushes data more than 6 months old, so for example when I export data in 12/22, everything before 06/22 is not reachable.

 

The data structure I have is, oversimplified of course, as follows:

 

EXPORT DATEAnomaly ID
31/01/2022A
31/01/2022B
31/01/2022C
28/02/2022A
28/02/2022C
31/12/2022D
31/12/2022E

 

In the example above:

  • The anomaly "B" has been fixed since the 01/22 export
  • The anomalies "A" and "C" still exist in the 02/22 export because they have not been fixed
  • The anomalies "A" and "C" do not appear in the 12/22 export because they have been flushed by the ERP, even if they still exist.

 

What I need to have at the end of the year is (data is exported on a monthly basis) :

Anomaly ID
A
C
D
E

 

Thanks in advance for any help!

4 Replies

  • Vijay_A_Verma's avatar
    Vijay_A_Verma
    Most Valuable Professional

    By your logic, anomalies A & C wouldn't appear as they will be flushed out because of 6 months logic. Then output will be only

    D

    E

    • Spigaw's avatar
      Spigaw
      Helper III

      We have no way of tagging the anomalies. I'll try to find a manual way to fix this, thanks for your help!

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Spigaw ,

     

    Any updates?

     

    Best Regards,
    Eyelyn Qin