Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hola
Tengo dos tablas, la tabla 1 contiene la lista de las facturas con su total y la tabla 2 tiene la lista de las facturas con el nombre de los vendedores implicados en cada venta, lo que necesito es crear una columna en la tabla 1 donde por medio de una formula cuente el numero de personas (de la tabla 2) que estuvieron involucradas en la factura, aqui muestro el ejmplo
Solved! Go to Solution.
Hi,@ceciliatc
Regarding the issue you raised, my solution is as follows:
1.In my understanding, what you want now is to use a calculated column instead of a measure, so I have improved my code as follows:
New Column = SUMX(
RELATEDTABLE(Table2),
IF(Table2[Inv No] = EARLIER(Table1[Inv No]), Table2[Count], 0)
)
2.Here's my final result, which I hope meets your requirements.
Can you share sample data and sample output in tabular format if I am misunderstanding? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hola, ya intente y como medida funciona, sin embargo lo que yo necesito es traer ese calculo a una columna nueva en mi tabla 1
Hi,@ceciliatc
Regarding the issue you raised, my solution is as follows:
1.In my understanding, what you want now is to use a calculated column instead of a measure, so I have improved my code as follows:
New Column = SUMX(
RELATEDTABLE(Table2),
IF(Table2[Inv No] = EARLIER(Table1[Inv No]), Table2[Count], 0)
)
2.Here's my final result, which I hope meets your requirements.
Can you share sample data and sample output in tabular format if I am misunderstanding? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,@ceciliatc
First of all, in my understanding, your requirement is to count the sum of the columns you represent in Table 2 in the case of the same inv no, and then return to Table 1 as the new column. If my understanding is wrong, please give me your relative opinion:
Regarding the issue you raised, my solution is as follows:
1.First I have created the following tables and the column names and data are the data you have given:
Table1:
Table2:
2. Then I created the following measure to achieve grouping, statistical, by inv no as the main filter criteria:
Nueva Columna = CALCULATE(SUM(Table2[Count]),FILTER(ALLSELECTED(Table1),'Table1'[Inv No]=MAX('Table2'[Inv No])))
3.Here's my final result, which I hope meets your requirements.
Can you share sample data and sample output in tabular format if I am misunderstanding? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
98 | |
91 | |
84 | |
73 | |
67 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
66 |