March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
115 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
164 | |
116 | |
63 | |
57 | |
50 |