Forum Discussion
powerbi2srm
3 years agoResolver II
CALCULAR VALORES DISTINTOS DE DOS TABLAS
Hola! Quiero calcular el número de valores que no coinciden entre dos columnas de dos tablas diferentes. En mi caso, tengo una tabla de facturas (fact_sale_invoice) y otra de ventas (fact_sale...
Anonymous
3 years agoNot applicable
Hi powerbi2srm ,
I created some data:
Table1:
Table2:
Intermediate tables:
Directly in the measure using two columns for comparison, there may be a Cartesian product, you can consider doing it in the calculated column.
Here are the steps you can follow:
1. Create calculated column.
Create calculated column pull indexes in two tables:
Table1Index =
SUMX(FILTER(ALL('Intermediate tables'),'Intermediate tables'[ID]='Table'[ID]),[Index])Table2Index =
SUMX(FILTER(ALL('Intermediate tables'),'Intermediate tables'[ID2]='Table2'[ID2]),[Index])Table2_amount =
SUMX(FILTER(ALL('Table2'),'Table'[Table1Index]='Table2'[Table2Index]),[Amount])Flag =
IF(
'Table'[Table2_amount]='Table'[Amount],1,0)Value =
IF(
[Flag]=1,COUNTX(FILTER(ALL('Table'),[Flag]=1),[ID]),0)
2. Result:
If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly