Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreThe FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now
I am trying to reconcile PayPal statements against a bank account and just want to get a list of incoming and outgoing transactions. To do this I need to weed out the refunds from that occur at a later date.
I'd like to write some code that goes something like this:
If current row name contains "Refund" then record that amount value.
Find another row with the opposite value.
Delete both lines.
Repeat for all lines.
Does anyone know how I write that?
Solved! Go to Solution.
Hi @JollyRoger01 ,
I created this sample data.
The result is this.
The method is to first find out the number with Refund, and then add a custom number to turn the found out number into the opposite. Then add the opposite sequence as a new query.
Turn the list into a table. Then use merge to merge the two tables, filter and delete redundant columns.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @JollyRoger01 ,
I created this sample data.
The result is this.
The method is to first find out the number with Refund, and then add a custom number to turn the found out number into the opposite. Then add the opposite sequence as a new query.
Turn the list into a table. Then use merge to merge the two tables, filter and delete redundant columns.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
That's perfect, thanks so much for your help on this!
This makes my transaction records more accurate as I'm not recording credits and debits that didn't really occur.
Do you want to show some sample data and the expected result?
I'm guessing you'll have to do something more than just look for a row with the opposite value. What if there are values that appear more than once, which one does the refund belong to?
|
|
Please accept the solution when done and consider giving a thumbs up if posts are helpful. Contact me privately for support with any larger-scale BI needs, tutoring, etc. |
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 6 | |
| 6 | |
| 5 |