Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Oi.
Tenho uma tabela com informações de pedidos e outra referente aos lançamentos de NFs dos pedidos, gostaria de criar uma coluna na tabela de pedidos com a soma das na tabela de NFs pois existem várias NFs referentes a um pedido.
Solved! Go to Solution.
Hi @Greg5 ,
I think your tables should look like as below.
Orders:
Invoice:
Here are two workarounds to achieve your goal.
1. Create an active relationship between two tables by [Orders] columns.
Sum of Invoice = CALCULATE(SUM(Invoice[Invoice]))
Result is as below.
2. If you don't want to create a relationship or you want to inactive the relationship between two tables, try this code.
Sum of Invoice = CALCULATE(SUM(Invoice[Invoice]),FILTER(Invoice,Invoice[Orders] = EARLIER(Orders[Orders])))
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Greg5 ,
I think your tables should look like as below.
Orders:
Invoice:
Here are two workarounds to achieve your goal.
1. Create an active relationship between two tables by [Orders] columns.
Sum of Invoice = CALCULATE(SUM(Invoice[Invoice]))
Result is as below.
2. If you don't want to create a relationship or you want to inactive the relationship between two tables, try this code.
Sum of Invoice = CALCULATE(SUM(Invoice[Invoice]),FILTER(Invoice,Invoice[Orders] = EARLIER(Orders[Orders])))
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
150 | |
115 | |
104 | |
89 | |
65 |