Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I am trying to get the average of project completions per week and then when I am changing the filter as what weeks I am seeing that the average would be tied into this filter. It is currently do the completion average for all the data which is this.
Average = CALCULATE(COUNT('CP Jobs'[Project]),ALL('CP Jobs'))/CALCULATE(DISTINCTCOUNT('CP Jobs'[Year-Wk]),ALL('CP Jobs'))
โ
โ
@Seth4040
Can you use below code and see if it is working or not.. if not then requesting you to provide some dummy data along with your desired output.
Average Value =
VAR FilteredValues =
CALCULATETABLE(
VALUES(Table[Value]),
ALLSELECTED(Table)
)
RETURN
AVERAGEX(FilteredValues, Table[Value])
Regards,
sanalytics
I think the use of ALL() is creating your problem - ALL() ingnores any filters applied at the page or visualization level (example, when you select a week filter, it gets ignored).
Try:
Average = CALCULATE(COUNT('CP Jobs'[Project]))/CALCULATE(DISTINCTCOUNT('CP Jobs'[Year-Wk]))
Check out the November 2025 Fabric update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!