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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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'))
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]))
@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
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 20 | |
| 11 | |
| 10 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 34 | |
| 31 | |
| 19 | |
| 12 | |
| 11 |