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

Get Fabric certified for FREE! Don't miss your chance! Learn more

Allow dynamic X-axis column selection in visuals for measures using RANKX or TOPN

Currently, Power BI requires all visuals to have a static column for the X-axis. Measures like RANKX or TOPN work only with columns that are known at compile time. When trying to create a dynamic ranking visual where the X-axis can be changed via a slicer, the engine fails because column references are only resolved at evaluation time.

This limitation prevents users from building fully interactive Top N or ranking visuals without reshaping data or creating multiple measures/visuals. A built-in ability to reference a dynamic column in DAX measures would:

  • Enable a single chart where users can select the dimension (column) to rank on via a slicer.

  • Eliminate the need to duplicate measures or visuals for each column.

  • Improve usability and reduce model complexity, especially for large datasets with multiple dimensions.

  • Work seamlessly with existing Top N filters, dynamic slicers, and ranking measures.

Proposed behavior:

  • Introduce a DAX function or enhancement where a column variable can be used as a reference inside RANKX, TOPN, or other aggregation functions.

  • Ensure it works in all visual types (table, matrix, clustered/bar/column charts) without requiring data reshaping.

  • Maintain backward compatibility with existing static column references.

Use case example:

A sales operations team wants a Top N chart of revenue by a dimension selected by the viewer. Currently, they must either:

  1. Reshape the data (unpivot columns) and build helper measures, or

  2. Create separate measures and visuals for each dimension.

With dynamic X-axis support, the same chart could update based on a slicer, making reports more interactive and reducing maintenance overhead.

Impact:

This enhancement would greatly improve the flexibility of reporting, reduce modeling complexity, and allow users to leverage DAX more effectively in interactive dashboards.

Status: New