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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

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
Microsoft Employee
Microsoft 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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.