Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Anyone know about MinMaxColumnPositionCallback in DAX Studio server timings?

I've run a trace on my DAX query, and many rows in the server timings show MinMaxColumnPositionCallback in bold, indicating it is a performance problem. I googled and get zero results.

 

Has anyone got some info on this?

6 REPLIES 6
Poojara_D12
Super User
Super User

Hi @AlexOnData 

The MinMaxColumnPositionCallback  in server timings indicates that Power BI is calculating the minimum and maximum positions of a column, often due to filtering or range queries on large datasets. This can cause performance issues, especially with high-cardinality columns.

How to Fix:

  1. Optimize Columns:

    • Reduce cardinality (e.g., group dates into hierarchies).
    • Use summarized data instead of raw values.
  2. Refactor DAX:

    • Simplify filters and calculations.
    • Use variables to avoid redundant operations.
  3. Optimize Relationships:

    • Use single-direction relationships where possible.
    • Avoid bi-directional filtering unless necessary.
  4. Check Visuals:

    • Simplify slicers or pre-filter data in Power Query.
  5. Use DAX Studio:

    • Analyze query performance and pinpoint bottlenecks.

Refining filters, columns, and relationships will usually resolve this issue.

 

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

Kind Regards,
Poojara
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS 

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos"

Kind Regards,
Poojara - Proud to be a Super User
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS
daXtreme
Solution Sage
Solution Sage

Try to ask this question to Marco Russo and/or Alberto Ferrari. If there's anything to know about it... they are the ultimate source of knowledge about anything DAX.

I know this is over 2 years late, but the SQLBI folks do have some docs on this now, available here:
xmSQL code in VertiPaq - SQLBI Docs

Quote:

MinMaxColumnPositionCallback: Transforms a column value into its position in the list of all values of the column properly sorted. The transformation uses the attribute hierarchy. If the attribute hierarchy is disabled (Available in MDX=False), then this callback cannot be used, and the column must be materialized to the formula engine to find min/max values.

 Hope this helps whoever searches for this obscure callback type in the future! 

I also (sort of) found another fix/cause for this callback.

 

I'm unfortunately dealing with a DirectQuery model, due to pre-existing architectural choices that are now being re-evaluated. The partiuclar source is Dremio Cloud, which is actually pretty fast and only has a few quirks around DQ, versus the many sources where DQ is terrible for performance. Still not as fast as Import or DirectLake, but changing a whole model mode is not something that can be changed in a few minutes after data load and partitioning strategies are considered. All that said, I have no idea if the below finding would apply in Import mode.

 

In this particular example, a column, let's call it

'Reporting Scenario'[Scenario]

in a Dual-mode table was being evaluated in a SELECTEDVALUE(), and didn't have a sort order column applied. There actually was a sort order column, let's call it

'Reporting Scenario'[Scenario Sort Order]

 in the same table that was intended to be used, but wasn't applied. Evaluation of this column showed that MinMaxColumnPositionCallback was being evaluated for the column. Applying the sort order column lead to a much simpler xmSQL statement without a MinMaxColumnPositionCallback on re-runs of an otherwise identical query.

 

Not all such columns where SELECTEDVALUE() would be used will have a meaningful sort order, and again I have no idea if this applies just to DirectQuery, DirectQuery over Dremio, or will hold in future versions of the Power BI engine. I've also rarely seen this callback be a meaningful performance issue in Import models, so unless there's some compelling reason or evidence that this callback is leading to other performance issues in the same measure/query, getting rid of this callback is unlikely to significantly improve report performance. But doesn't hurt to try if time and resources allow.

 

Anonymous
Not applicable

How do I go about asking these gents?

@Anonymous  you can ping users on forums using @ and their name e.g. '@marcorusso or '@AlbertoFerrari.

For my take to your dilemma I recommend checking this blog by entreprisedna: Performance Issue In DAX Studio: CallBackDataID - Enterprise DNA

It discusses the likely reason these rows are bolded and a solution proposal to the issue.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.