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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Assigning a Row Label before a Key Column Breaks Sort By Column Functionality

Hello, all!  I encountered unexpected behavior when assigning a row label and key column to a table.  When doing so under certain conditions, all "sort by column" settings on that table appear to no longer be reflected in the report view.  Here is a minimal reproducible example.

 

I have a single dimension table (note that the order column differs from the natural order of the description):

KeyDescriptionOrder

1

Title A1
2Title B3
3Title C2

 

In the data view, I set the "Description" column to sort by the "Order" column.

aswanso1_0-1750689731211.png

 

In the model view, I set "Description" as the row label, then I set "Key" as the key column of this table (no issues seem to occur if the row label is set after the key column).

aswanso1_8-1750694107025.png

 

In the report view, I created a simple stacked column chart, with the "Description" column for the X-axis and "Count of Key" for the Y-axis.

aswanso1_7-1750693015551.png

 

Based on the table that I provided and the "Sort by column" settings, I expect the order of the columns to be "Title A", "Title C", "Title B", but the visual instead shows "Title A", "Title B", "Title C".  The description column appears to be ignoring my specification to sort by the "Order" column, and is instead just sorting by itself.  I cannot use "Sort axis" on the visual to sort correctly.

 

If it is helpful to diagnose the issue, I have discovered a few ways to "resolve" the issue.

  1. The key column can simply be unassigned from the model view, and the report view will correct itself.
  2. I can unassign the key column from the model view, and reassign the key column while no row label is assigned to the table.  Then any visuals created on the report view seem to sort correctly.  Notably, this does not seem to work if I reassign the key column while a row label is assigned to the table (I can assign the row label afterward, I just can't have it set while performing the reassignment).

For now, I can simply not use key columns, but I would like to be able to use Power BI as intended.

Here is a link to my Power BI file: https://drive.google.com/file/d/11hJHStJmGy08Hdq1heE1TtOYlg7UyNoh/view?usp=sharing

Thank you for your attention.

Status: New