Forum Discussion
Get volume (multiplication)
- Anonymous4 years ago
Hi brinky ,
Try this code.
Measure 3 = VAR _Invoiced_QTY = CALCULATE(SUM(Combined_Sales[Invoiced_QTY_PU]),FILTER(Combined_Sales,Combined_Sales[Return_Reason] in {1,BLANK()})) VAR _Volumn = CALCULATE(SUM(Volume[Volume]),FILTER(Volume,Volume[CSB_ID_Code] = MAX(Combined_Sales[CSB_ID_Code]))) RETURN _Invoiced_QTY*_VolumnResult is as below.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi brinky ,
I think your [Measure 4] is based on [Measure 2] and related
I create a sample to have a test.
CombinedSales:
VolumTable_1:
I created a relationship between two tables by Category.
Measures are the same, it works well.
Firstly, please check whether [Measure 2] is correct. You can add a calculated column by related function to get data from [Litres] in CombinedSales.
C_Litries = RELATED(VolumTable_1[Litres])
Or create a measure.
C_Litries = calculated(sum(VolumTable_1[Litres]),Filter(VolumTable_1,VolumTable_1[...] = max(CombinedSales[...])))
And check whether [Litres] part is correct.
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.
- brinky4 years ago
Helper IV
Anonymous
Thanks for your reply & sample data.
I have these 2 tables connected with Code (attached), what I am after is;
if Return_Reason is 1 or blank Sum the Invoiced_QTY and multiple with Volume from the Volume table- Anonymous4 years agoNot applicable
Hi brinky ,
Try this code.
Measure 3 = VAR _Invoiced_QTY = CALCULATE(SUM(Combined_Sales[Invoiced_QTY_PU]),FILTER(Combined_Sales,Combined_Sales[Return_Reason] in {1,BLANK()})) VAR _Volumn = CALCULATE(SUM(Volume[Volume]),FILTER(Volume,Volume[CSB_ID_Code] = MAX(Combined_Sales[CSB_ID_Code]))) RETURN _Invoiced_QTY*_VolumnResult is as below.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.