Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello,
I'd like to know how I can optimize this measure. The goal is to eliminate double iteration while keeping the logic.
efficency iterative =
AVERAGEX(
VALUES(dim_date[date]),
AVERAGEX(
VALUES(dim_department[departmentKey]),
[efficiency])
)
Some notes:
Logic:
Calculate efficiency for the Department and then average the results of each department's efficiency throughout the day.
File in attachment. Thanks a lot.
The goal is to eliminate double iteration while keeping the logic.
aka "wash me but don't make me wet"
If you need the average of averages then you cannot avoid double iteration. Best you can do is reduce cardinality in each iteration.
Have you checked the query plan in DAX Studio?
HI @vojtechsima
I'm nnot sure i really understood the question.
Would a measure like this help?
MyEfficience =
VAR _Table =
SUMMARIZE(
'fact',
'fact'[dateKey],
'fact'[departmentKey],
"__Eff", CALCULATE( [efficiency] )
)
VAR _Result =
AVERAGEX(
_Table,
[__Eff]
)
RETURN
_Result
cleaner_dax_with_iterators_json - mine.pbix
Please let me know if you have any comments/questions.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
79 | |
73 | |
57 | |
36 | |
31 |
User | Count |
---|---|
91 | |
60 | |
60 | |
49 | |
45 |