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.
I want to calculate sum of quantity from Table A, if the records are aviable in Table B.
Please help on this
Solved! Go to Solution.
Hi, @Anonymous
I am unable to access the link. For further information, please show us a valid link. So I create data to reproduce your scenario.
TableA:
TableB:
There is a many-to-one relationship between two tables.
You may create a measure as follows.
SumQuantity =
var _result =
SUMX(
RELATEDTABLE(TableB),
TableB[Quantity]
)
return
IF(
_result= 0,
0,
_result
)
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous
If you take the answer of someone, please mark it as the solution to help the other members who have same problems find it more quickly. If not, let me know and I'll try to help you further. Thanks.
Best Regards
Allan
Hi, @Anonymous
I am unable to access the link. For further information, please show us a valid link. So I create data to reproduce your scenario.
TableA:
TableB:
There is a many-to-one relationship between two tables.
You may create a measure as follows.
SumQuantity =
var _result =
SUMX(
RELATEDTABLE(TableB),
TableB[Quantity]
)
return
IF(
_result= 0,
0,
_result
)
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous
to correct answer show data sample from both of your tables and point to summarized field
@Anonymous
you can create relationships between your table, add it to visual and filter out by TableB is not blank
see attach
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 |
---|---|
106 | |
104 | |
77 | |
68 | |
61 |
User | Count |
---|---|
148 | |
107 | |
106 | |
82 | |
70 |