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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Omega
Impactful Individual
Impactful Individual

Order in descending order

Hi,

 

I created a table using selectcolumn function:

 

WeekCountryImpactRCKPI 1KPI 2
1.2017AL1RC239122532
1.2017AL1RC16463357
1.2017AL2RC316844316
1.2017AL2RC52473658
1.2017BL1RC211081157
1.2017BL1RC126741490
1.2017BL2RC342894665
1.2017BL2RC542391306
2.2017AL1RC29041224
2.2017AL1RC125893002
2.2017AL2RC320112429
2.2017AL2RC53005214
2.2017BL1RC234741779
2.2017BL1RC147596
2.2017BL2RC319504282
2.2017BL2RC59083278

 

I'm trying to do the following:

 

  1. Sort in descending order my RC based on KPI 1 without affecting my week, country or impact. In other words, for every week, country and impact, sort my RC based on KPI 1 from highest to lowest (Check below table)
  2. Create KPI 4: If (Country (current row) = Country (previous row), KPI 4 value (previous row) - KPI 3 (current row), 1-KPI 3 (Current row)). KPI 3 = KPI 1/KPI 2. Please check the below table. 

I believe it's a mixture of RANKX and Earlier but I'm not an expert in both 😞

 

Can someone please help? 😄

 

Thanks!

 

WeekCountryImpactRCKPI 1KPI 2KPI 3KPI 4
1.2017AL1RC239122532154.50%-54.50%
1.2017AL1RC1646335719.24%-73.75%
1.2017AL2RC52473658375.84%-449.58%
1.2017AL2RC31684431639.02%-488.60%
1.2017BL1RC126741490179.46%-668.06%
1.2017BL1RC21108115795.76%-763.83%
1.2017BL2RC34289466591.94%-855.77%
1.2017BL2RC542391306324.58%-1180.35%
2.2017AL1RC12589300286.24%13.76%
2.2017AL1RC2904122473.86%-60.10%
2.2017AL2RC530052141404.21%-1464.30%
2.2017AL2RC32011242982.79%-1547.10%
2.2017BL1RC14759679316.67%-80863.76%
2.2017BL1RC234741779195.28%-81059.04%
2.2017BL2RC31950428245.54%-81104.58%
2.2017BL2RC5908327827.70%-81132.28%
1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

HI @Omega,

 

Current power bi not support to sort table by multiple columns or setting sort order priority.

For your situation, you can vote below idea which has the similar requirement:

Multiple column sort

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

HI @Omega,

 

Current power bi not support to sort table by multiple columns or setting sort order priority.

For your situation, you can vote below idea which has the similar requirement:

Multiple column sort

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Omega
Impactful Individual
Impactful Individual

Thanks!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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