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.
Hi can somebody tell me how I can me my measure sum up to the correct total. The correct total for me is 2281,72+1569,08
It seems to wrong when i'm multiplying the initial amount time the quantity. I tried to create the quantity with a measure and one with power query. Both doesn't seem to add up to the total i'm looking for
VC Material Costs(Today) =
CALCULATE (
sum ('01 Sales Material URM/VC Report'[COND_.Amount] )*SUM('01 Sales Material URM/VC Report'[Quantity2]),
FILTER (
'01 Sales Material URM/VC Report',
'01 Sales Material URM/VC Report'[COND_.URMSalesMKey]= '01 Sales Material URM/VC Report'[URMSalesMKey]
&& '01 Sales Material URM/VC Report'[COND_.Valid From] <= TODAY()
&& '01 Sales Material URM/VC Report'[COND_.Valid to] >= TODAY()
&& FIND("MAT",'01 Sales Material URM/VC Report'[VC Variant PRD/MAT/ASS],1,0)
))
Measure 2 =
CALCULATE (
sum ('01 Sales Material URM/VC Report'[COND_.Amount] )*[Quantity],
FILTER (
'01 Sales Material URM/VC Report',
'01 Sales Material URM/VC Report'[COND_.URMSalesMKey]= '01 Sales Material URM/VC Report'[URMSalesMKey]
&& '01 Sales Material URM/VC Report'[COND_.Valid From] <= TODAY()
&& '01 Sales Material URM/VC Report'[COND_.Valid to] >= TODAY()
&& FIND("MAT",'01 Sales Material URM/VC Report'[VC Variant PRD/MAT/ASS],1,0)
))
Solved! Go to Solution.
Hi @Kpham,
Without knowing the structure of your data, my workaround is to use SUMX function:
var a=
SUMX (
FILTER (
'01 Sales Material URM/VC Report',
'01 Sales Material URM/VC Report'[COND_.URMSalesMKey]= '01 Sales Material URM/VC Report'[URMSalesMKey]
&& '01 Sales Material URM/VC Report'[COND_.Valid From] <= TODAY()
&& '01 Sales Material URM/VC Report'[COND_.Valid to] >= TODAY()
&& FIND("MAT",'01 Sales Material URM/VC Report'[VC Variant PRD/MAT/ASS],1,0)
)
'01 Sales Material URM/VC Report'[COND_.Amount]
)
var b=
SUMX (
FILTER (
'01 Sales Material URM/VC Report',
'01 Sales Material URM/VC Report'[COND_.URMSalesMKey]= '01 Sales Material URM/VC Report'[URMSalesMKey]
&& '01 Sales Material URM/VC Report'[COND_.Valid From] <= TODAY()
&& '01 Sales Material URM/VC Report'[COND_.Valid to] >= TODAY()
&& FIND("MAT",'01 Sales Material URM/VC Report'[VC Variant PRD/MAT/ASS],1,0)
)
'01 Sales Material URM/VC Report'[Quantity2]
)
return a*b
If you still have some question, please don't hesitate to let me known.
Best Regards,
Link
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!
Hi @Kpham,
Without knowing the structure of your data, my workaround is to use SUMX function:
var a=
SUMX (
FILTER (
'01 Sales Material URM/VC Report',
'01 Sales Material URM/VC Report'[COND_.URMSalesMKey]= '01 Sales Material URM/VC Report'[URMSalesMKey]
&& '01 Sales Material URM/VC Report'[COND_.Valid From] <= TODAY()
&& '01 Sales Material URM/VC Report'[COND_.Valid to] >= TODAY()
&& FIND("MAT",'01 Sales Material URM/VC Report'[VC Variant PRD/MAT/ASS],1,0)
)
'01 Sales Material URM/VC Report'[COND_.Amount]
)
var b=
SUMX (
FILTER (
'01 Sales Material URM/VC Report',
'01 Sales Material URM/VC Report'[COND_.URMSalesMKey]= '01 Sales Material URM/VC Report'[URMSalesMKey]
&& '01 Sales Material URM/VC Report'[COND_.Valid From] <= TODAY()
&& '01 Sales Material URM/VC Report'[COND_.Valid to] >= TODAY()
&& FIND("MAT",'01 Sales Material URM/VC Report'[VC Variant PRD/MAT/ASS],1,0)
)
'01 Sales Material URM/VC Report'[Quantity2]
)
return a*b
If you still have some question, please don't hesitate to let me known.
Best Regards,
Link
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!
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 | |
61 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |