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.
Lo All,
I have a correct measure for my weighted average but when I attempt to related our orders w/ a delta calc that wAverage recalcs per order. How can I maintain the static weighted average when applying OrderID Context (see images):
wAvg_Actual = CALCULATE(SUMX(TBLDATA,((TBLDATA[QTY]*TBLDATA[BILL_DAYS])/7)*TBLDATA[Actual_Price.Disc])/SUMX(TBLDATA,((TBLDATA[BILL_DAYS]/7)*TBLDATA[QTY])),TBLDATA[Actual_Price.Disc]>0)
Thank you kindly
Solved! Go to Solution.
Was able to get this to work using "ALLExcept" but I also need a secondary filter for when a field is > 0
wAvg_Actual = CALCULATE(SUMX(TBLDATA,((TBLDATA[QTY]*TBLDATA[BILL_DAYS])/7)*TBLDATA[Actual_Price.Disc])/SUMX(TBLDATA,((TBLDATA[BILL_DAYS]/7)*TBLDATA[QTY])),ALLEXCEPT(TBLDATA,TBLDATA[E.CODE]))
Was able to get this to work using "ALLExcept" but I also need a secondary filter for when a field is > 0
wAvg_Actual = CALCULATE(SUMX(TBLDATA,((TBLDATA[QTY]*TBLDATA[BILL_DAYS])/7)*TBLDATA[Actual_Price.Disc])/SUMX(TBLDATA,((TBLDATA[BILL_DAYS]/7)*TBLDATA[QTY])),ALLEXCEPT(TBLDATA,TBLDATA[E.CODE]))
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 |
---|---|
49 | |
27 | |
20 | |
15 | |
12 |
User | Count |
---|---|
58 | |
50 | |
44 | |
19 | |
18 |