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
Anonymous
Not applicable

Sort null values of one column by another

How can you sort null values in one column based on another column?

 

Against each null value in column A, there is a different value in column B.

7 REPLIES 7
Anonymous
Not applicable

I can't add the Sorting reference column in Visual as value, column or row and hide it.. Because my columns are dynamic.

 

I wish there was a way like we can sort visuals by placing a value in tooltip. Sadly not available in table.

mussaenda
Super User
Super User

Hi @Anonymous ,

 

Can you provide a sample data along with your expected output?

Thanks

Anonymous
Not applicable

@amitchandak  @mussaenda 

 

I am using visual matrix so I have 3 files in Row section.

 

Category A

Category A1

Category A1.1

Category A1.2

Category A2

Category A2.1

Category A2.2

 

Category B

Category B1

Category B1.1

Category B1.2

Category B2

Category B2.1

Category B2.2 and so on as 10 Categories total.

 

 

Now category A, B, C, etc. cannot be empty, but category A1, A2, B1, B2 can be empty. Category A1.1 A1.2 B1.1 B1.2 etc. it can never be empty.

 

 

Now the problem is when A1 A2 B1 B2 etc are empty, but your sub catering is not empty. I can't sort them in order.

 

 

when I try to sort my 2nd category column by 3rd category coulumn it doesn't allow me to sort the data because 2nd category has a lot of null values, but 3rd category has no NULL values. So when I order it, it gives the error "2nd Category cannot be sorted by 3rd, because 3rd Category cannot have multiple values ​​for the same 2nd Category value" ...

 

So the question is, how can I sort the null values ​​in one column based on the values ​​in another column ... For every null value, there is a difference value in another column 

Sorry @Anonymous ,

 

I didn't know this is in Matrix.

I thought this is on Power Query.

 

 

 

Anonymous
Not applicable

I have tried every possible combination. But not able to find a solution.

amitchandak
Super User
Super User

@Anonymous , You can not. Sort column need to 1-1 mapping

Anonymous
Not applicable

Is there any way to achieve this? work around?

 

I really need it. trying to get it done for last 2 days.

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.