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
mterry
Helper V
Helper V

Creating columns from row values

I tried using unpivot, but that doesn't seem to be working (or I'm not using it correctly).  Here's a description of my issue:

I have a column with many company divisions, another column with region the division covers, and a third column wiht the revenue. There is overlap between the divisions and regions. What I would like to do is convert this table so that there is one row per division, and 12 columns - one for each region - the regional columns contain the revenue data, and if a division doesn't operate in that particular division I'm fine with a $0 value or N/A. I thought the format was good for PowerBI, but I've been asked to put this data in a table/matrix where the columns are the regions, but can be sortable by each particular region. If that's do-able now and I'm misunderstanding please let me know.  

1 ACCEPTED SOLUTION

Hi,

 

I dont think that is possible in a matrix visual.  In a matrix visual, you can sort by the Grand Total column (not by individual columns).


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

8 REPLIES 8
v-jiascu-msft
Employee
Employee

Hi @mterry,

 

The Matrix will be very helpful in your scenario. 

1. Do you want a calculated table?

2. What kind of sort do you want?

 

Best Regards,

Dale

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

I dont need any calculations, i just want the ability to sort by different columns

Hi @mterry,

 

Can you show an example and a sample data? You can sort it as the snapshot shows.

Creating_columns_from_row_values

 

Best Regards,

Dale

 

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

Sure, below is an example - what I would like to do is be able to sort by the value per region - Midwest, Southeast, etc....as you could do in an excel table. I've also included a screen-shot of the data in excel (this is all just a sample). I believe I could accomplish this by using the table visual, but I would need to convert the data so that there is a column for each region. I was wondering if the same could be accomplished without converting the data as the current format is typically much more useful for PowerBI. 

Sample.JPGSample2.JPG

Hi @mterry,

 

What do you mean by "Sort by the value per region"?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

For instance, in the Matrix Visual, I would like to be able to sort largest to smallest for all revenue in the Northwest

Hi,

 

I dont think that is possible in a matrix visual.  In a matrix visual, you can sort by the Grand Total column (not by individual columns).


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

I was afraid that was the case, seems like an odd shortcoming. I think I've found a workaround for creating new columns and using the table visualization.

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.