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
meiwah
Resolver I
Resolver I

Table & Matrix Combo

Hi,

 

I would like to have a table which can show for every product – Country/Region, City, Category, Sub-Category and Product Name and the Sales of every month. For the portion highlighted by the red box, can be satisfied by a table. For the portion highlighted by the orange box, can be satisfied by a matrix.

 

meiwah_0-1712284535622.png

 

I can’t use a matrix with step off because I need to sort the table not only by the first column – Country/Region but also by City, Category, Sub-Category and Product Name as what can be done in a table.

 

Is there anyone who know how to implement such a table and matrix combo? Pls help! I’ve tried Deneb but maybe I’m not good at it, I didn’t manage to find the solution. Thanks! 🙂

10 REPLIES 10
mahenkj2
Solution Sage
Solution Sage

Hi @meiwah ,

 


I can’t use a matrix with step off because I need to sort the table not only by the first column – Country/Region but also by City, Category, Sub-Category and Product Name as what can be done in a table.

 

 


Perhaps I am mistaken to understand your problem correctly, but if not so, can you not individually sort this way?

 

mahenkj2_0-1712503310754.png

 Please check if it helps.

Hi Mahenkj, 

 

Thanks for your reply! The sorting I would like to have is like in a table where if the sorting is done by country, the table matrix combo should yield the below order. 

meiwah_0-1712539008974.png

 

Thanks and really appreciate your effort! 🙂

 

Hi Mahenkj, 

 

Thanks for your reply! The sorting I would like to have is like in a table where if the sorting is done by country, the table matrix combo should yield the below order. 

meiwah_0-1712539008974.png

 

Thanks and really appreciate your effort! 🙂

 

AnalyticsWizard
Solution Supplier
Solution Supplier

@meiwah 

To create a table and matrix combo in Power BI that allows for sorting by multiple columns while displaying monthly sales data, you can follow these steps:

  1. Create a Table Visual: Start by creating a table visual for the non-time series data. Include the columns for Country/Region, City, Category, Sub-Category, and Product Name.

  2. Create a Matrix Visual: Next, create a matrix visual for the time series data (monthly sales). Place the ‘Date’ or ‘Month’ field in the columns area and the sales measure in the values area.

  3. Enable Drill Down: On the matrix visual, enable the drill-down functionality. This allows you to view the sales data at different levels of granularity.

  4. Link Both Visuals: Ensure both the table and matrix visuals are using the same data model. This way, when you sort one visual, it will not affect the sorting of the other.

  5. Use Bookmarks: To maintain the sort order independently on each visual, you can use bookmarks to save the state of your report page, including the sort order.

  6. Sync Slicers: If you have slicers in your report, synchronize them across both visuals so that filtering on one visual will apply to the other.

By setting up your report this way, you can sort the table by any column while the matrix handles the monthly sales data. If you need to sort the matrix by other dimensions, consider adding those fields to the rows area and using the drill-down functionality. Remember, the sorting in the matrix will be limited to the hierarchy you set up in the rows area.

Hi AnalyticsWizard,

 

If I've the data in a table and a matrix separately, it will inititally appears as the below

meiwah_1-1712543448068.png

 

But when subsequently, the table is sorted by Category in descending order, the order of the products will change in the table but the product order in the matrix wouldn't be able to follow

meiwah_2-1712543481516.png

 

May be I didn't understand your solution fully, pls enlightening on how to sync the sort order between the table and the matrix. Thank you very much! 🙂

Hi AnalyticsWizard,

 

If I've the data in a table and a matrix separately, it will inititally appears as the below

meiwah_1-1712543448068.png

 

But when subsequently, the table is sorted by Category in descending order, the order of the products will change in the table but the product order in the matrix wouldn't be able to follow

meiwah_2-1712543481516.png

 

May be I didn't understand your solution fully, pls enlightening on how to sync the sort order between the table and the matrix. Thank you very much! 🙂

Ritaf1983
Super User
Super User

Hi @meiwah 
If I understood you correctly the problem, is that there is no option to sort rows inside matrix columns. 
For example, you can't sort the rows by sales of January,  I don't think we have the needed functionality/workarounds to solve it.
Only to create a measure for every month.

We have an idea about this issue please vote for it:

https://ideas.fabric.microsoft.com/ideas/idea/?ideaid=10822e38-2f28-ec11-b76a-281878bd589b

I voted 🙂
Also, you can check the add-ins like Inforiver / zebra.

https://inforiver.com/matrix/

https://zebrabi.com/power-bi-custom-visuals/

 

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

 

Thanks! I've already voted for the idea

Ashish_Mathur
Super User
Super User

Hi,

Drag the first 5 columns to the row well of the matrix visual.  Drag Year and Month name from the Calendar Table to the Column well of the matrix visual.  To sort, specific columns/fields, click on the first column you want to sort and then with e Shift key pressed, click on the others columns which you want to sort by.


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

I can’t use a matrix with step off because I need to sort the table not only by the first column – Country/Region but also by City, Category, Sub-Category and Product Name

sort how? alphabetically?

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.