Forum Discussion

FritzVPL's avatar
FritzVPL
Advocate II
2 years ago

Calculate function results change based on default sort order of a column

I need some help explaining this behavior. It caught me off guard and I can't seem to get my head around why its occuring.

 

See these two calculate metrics.

 

Test Filter = CALCULATE(sum('Test Fact Table'[Amount]),FILTER(Test_Dim_Table,Test_Dim_Table[Service Level]="Ground"))
 
Test No Filter = CALCULATE(sum('Test Fact Table'[Amount]),Test_Dim_Table[Service Level]="Ground")
 

As expected, the "No Filter" test metric is repeating the value for ground on each service level.

 

However, if you change the default sort of service level to be off a different column, it will yield this result.

 

Why does using the "Sort by Column" feature change the results of this calculation? Is this expected or a potential bug?

 

 

2 Replies

  • you are using "Sort by Column" not sorting from the grid itself ?

    • FritzVPL's avatar
      FritzVPL
      Advocate II

      Correct, "Sort by column" sorting based on a different column on the same dimension table