Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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]))
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
7 | |
7 | |
6 | |
6 |
User | Count |
---|---|
27 | |
12 | |
10 | |
9 | |
6 |