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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
SAMUEL_KIARIE
Frequent Visitor

Order by with Summarise

How do I order by Date;
Which is the best concept to create a table & order by  Sk_Date  asc?

Sales_Table = SUMMARIZE(Fct_Sale_Item,
        DIM_Date[sk_date],
         DIM_Date[cod_year],
         DIM_Date[COD_WEEK],
        Dim_Product[SKU Simple],
        "unit price",sum(Fct_Sale_Item[Unit Selling Price]))

 

 

1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hi  @SAMUEL_KIARIE ,

There is no sort option in summarize function, you can find that table in Date view interface and sort the field [sk_date] as the below screenshot after the calculated table created.vyiruanmsft_0-1681352776830.png

In addition, please review the following links and check if it can used as an workaround.


SUMMARIZE does not include sorting. It just creates a table. If you want to create a physical table, you can sort the actual table using the table interface and/or the " Sort column by" in the ribbon. 
HOWEVER, this sorting order of a physical table is only relevant to sorting fields in visuals. Measures are oblivious to this, since they return scalar values based on row/filter context and not tables. 
To establish an order relevant to measures, you either create a calculated column in the physical table (which will however remain static) using RANK.EQ or RANKX, or you create a measure to rank values using RANKX (which can be dynamic)

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yiruan-msft
Community Support
Community Support

Hi  @SAMUEL_KIARIE ,

There is no sort option in summarize function, you can find that table in Date view interface and sort the field [sk_date] as the below screenshot after the calculated table created.vyiruanmsft_0-1681352776830.png

In addition, please review the following links and check if it can used as an workaround.


SUMMARIZE does not include sorting. It just creates a table. If you want to create a physical table, you can sort the actual table using the table interface and/or the " Sort column by" in the ribbon. 
HOWEVER, this sorting order of a physical table is only relevant to sorting fields in visuals. Measures are oblivious to this, since they return scalar values based on row/filter context and not tables. 
To establish an order relevant to measures, you either create a calculated column in the physical table (which will however remain static) using RANK.EQ or RANKX, or you create a measure to rank values using RANKX (which can be dynamic)

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.