Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hola,
Estoy tratando de comparar los importes de las facturas de dos programas para ver cuáles no coinciden. Cada programa está en una tabla:
- account_invoice_programaA
- account_invoice_programa_B
Ambas están relacionadas por un campo llamado: id_programaA.
Quiero ignorar las diferencias de hasta 5 céntimos, para lo que he utilizado el siguiente código:
Num distintos importes =
CALCULATE(
COUNT(account_invoice_programaB[id_programaA]),
FILTER(
account_invoice_programaB,
ROUND(account_invoice_programaB[importe_programaB],2) <> ROUND(RELATED(account_invoice_programaA[importe_programaA]),2) &&
ROUND(account_invoice_programaB[importe_programaB],2) - 0.01 <> ROUND(RELATED(account_invoice_programaA[importe_programaA]),2) &&
ROUND(account_invoice_programaB[importe_programaB],2) - 0.02 <> ROUND(RELATED(account_invoice_programaA[importe_programaA]),2) &&
ROUND(account_invoice_programaB[importe_programaB],2) - 0.03 <> ROUND(RELATED(account_invoice_programaA[importe_programaA]),2) &&
ROUND(account_invoice_programaB[importe_programaB],2) - 0.04 <> ROUND(RELATED(account_invoice_programaA[importe_programaA]),2) &&
ROUND(account_invoice_programaB[importe_programaB],2) - 0.05 <> ROUND(RELATED(account_invoice_programaA[importe_programaA]),2) &&
ROUND(account_invoice_programaB[importe_programaB],2) + 0.01 <> ROUND(RELATED(account_invoice_programaA[importe_programaA]),2) &&
ROUND(account_invoice_programaB[importe_programaB],2) + 0.02 <> ROUND(RELATED(account_invoice_programaA[importe_programaA]),2) &&
ROUND(account_invoice_programaB[importe_programaB],2) + 0.03 <> ROUND(RELATED(account_invoice_programaA[importe_programaA]),2) &&
ROUND(account_invoice_programaB[importe_programaB],2) + 0.04 <> ROUND(RELATED(account_invoice_programaA[importe_programaA]),2) &&
ROUND(account_invoice_programaB[importe_programaB],2) + 0.05 <> ROUND(RELATED(account_invoice_programaA[importe_programaA]),2)
),
USERELATIONSHIP(dim_date[date_id], account_invoice_programaA[programaA_invoice_date_id])
)
Solved! Go to Solution.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
92 | |
82 | |
71 | |
49 |
User | Count |
---|---|
143 | |
121 | |
111 | |
59 | |
57 |