Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hello,
I am trying to substract 2 values, based in Trx_ID and StatusAuditPayment.
So if the have same trx_id I want that value from created_at based on status "Approved" substract from value from completed_date if have the status auditpayment "Successful"
Thank you!
Solved! Go to Solution.
Hi @Laur_entiu_st ,
Please try:
substract value =
var _a = MAXX(FILTER('Table',[trx_id]=EARLIER('Table'[trx_id])&&[Status AuditPayment]="Approved"),[created_at])
var _b = MAXX(FILTER('Table',[trx_id]=EARLIER('Table'[trx_id])&&[Status AuditPayment]="Successful"),[completed_date])
return DATEDIFF(_a,_b,MINUTE)
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Laur_entiu_st ,
Please try:
substract value =
var _a = MAXX(FILTER('Table',[trx_id]=EARLIER('Table'[trx_id])&&[Status AuditPayment]="Approved"),[created_at])
var _b = MAXX(FILTER('Table',[trx_id]=EARLIER('Table'[trx_id])&&[Status AuditPayment]="Successful"),[completed_date])
return DATEDIFF(_a,_b,MINUTE)
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the April 2026 Power BI update to learn about new features.
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.
| User | Count |
|---|---|
| 43 | |
| 38 | |
| 35 | |
| 21 | |
| 15 |
| User | Count |
|---|---|
| 63 | |
| 58 | |
| 28 | |
| 27 | |
| 25 |