Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi, would appreciate some help. I am trying to figure out how to see if a charge that was deleted was added to another charge. For example, Charge 1 is 5, and then it was deleted. It was then added onto charge 2, you can tell since charge 2 was originally 10 but it was updated to 15. Same thing with Charge 3, its originally 3, then deleted. You can see that Charge 6 went from 9 to 12 (difference of 3). Hope that makes sense. I am dealing with 100,000s of rows, so needs to be optimal. Thanks!
Solved! Go to Solution.
if I understand you correct try a column
Added =
var _isUpdatedAfter = CALCULATE(COUNTROWS('Table'), FILTER(ALLEXCEPT('Table', 'Table'[ID]), 'Table'[Step] = "Updated" && 'Table'[Charges] > EARLIER('Table'[Charges])))
RETURN
IF([Step] = "Line deleted" && _isUpdatedAfter > 0, "yes", "no")
so, whats your desired output? how should look like result?
@az38 Hi, trying to see if a deleted charge was added to another charge. I updated below, so charge 7 was deleted, but was not added to another charge. Hope that makes sense.
@az38 Forgot to mention there are certain ID to factor in. So for example, ID 2 has a charge that was updated from 5 to 7 (difference of 2), but that can't be from charge 7 being deleted from ID 1.
Hi @PowerBI123456 ,
Could the method @az38 posted meet your requirements?
If it could, please accept his reply as solution to your question so that people who may have the same question can get the solution directly.
If not, please let me know.
In addition, is it necessary to judge whether the difference is the same as the deleted line value? What if they are not the same?
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@az38 Could you please help me understand why you wrote the variable out the way you did? Just trying to understand it better., specifically the ">Earlier" part. Thanks!!!
EARLIER() in calculated column refers to the currrent row value. so, we need to define if there is exists a row after current with given conditions
@az38thank you!!!
I am testing it out now, and also need to verify against a system. I will let you know once I am done, thanks again!!!
if I understand you correct try a column
Added =
var _isUpdatedAfter = CALCULATE(COUNTROWS('Table'), FILTER(ALLEXCEPT('Table', 'Table'[ID]), 'Table'[Step] = "Updated" && 'Table'[Charges] > EARLIER('Table'[Charges])))
RETURN
IF([Step] = "Line deleted" && _isUpdatedAfter > 0, "yes", "no")
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
60 | |
58 | |
54 | |
36 | |
33 |
User | Count |
---|---|
79 | |
66 | |
45 | |
44 | |
42 |