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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi all,
I am trying to get a measure working to get information about the average cumulative duration of sorted data.
The following two tables are used:
Log:
Cases:
Expected result in a matrix:
This works fine with the following when DurationAtStart is the following measure until I work with a big dataset:
DurationAtStart =
VAR auxT_ =
ADDCOLUMNS (
Log,
"ValueSum_",
CALCULATE (
SUM ( Log[duration] ),
Log[event_number] <= EARLIER ( Log[event_number] ) - 1,
ALLEXCEPT ( Log, Log[id] )
)
)
RETURN
AVERAGEX ( auxT_, [ValueSum_] )
Do you any tips on how I can change the measure so everything works faster? Right now on a bigger dataset it stops calculating because the memory limit will get reached. I don't want to pre calculate everything unless it really is the last option.
Thank you for your help!
Lucmax
You can refer to this blog:
https://maqsoftware.com/expertise/powerbi/dax-best-practices
Please provide sample data in usable format (not as a picture).
Have you considered using DAX Studio to evaluate the performance of your measure query?
User | Count |
---|---|
3 | |
2 | |
2 | |
2 | |
1 |
User | Count |
---|---|
10 | |
8 | |
6 | |
5 | |
4 |