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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Hello_masters
Frequent Visitor

Create a column in matrix or normal table to show minimum of the row

Hello, I am struggling with adding a column at the end to show the min of the values in the row. This is how my dashboard is looking right now. The data below shows the inventory projection of each product across weeks. Users can select the period they want to refer to. 

Hello_masters_0-1727751640010.png

 

I want the table/matrix to look like this so that I can filter to show only the products with huge shortfalls. As such, on top of having the "min" column, I will also need a slicer/filter which I can use to filter based on "min" column to show only products with huge shortfalls (can be a range or a value the user selects):

Hello_masters_1-1727751933316.png

The goal of this dashboard is to enable users to navigate the data and look for products based on the shortfall so that they are able to action based on priority. 

 

This is a snapshot of how my original data looks like:

Hello_masters_2-1727752471244.png

and what I have transformed it to for the dashboard:

Hello_masters_3-1727752498482.png

This is how my dashboard looks like:

Hello_masters_4-1727752542482.png

I can send the file to you if you need. Please let me know if there is any better way to build this dashboard 🙂 Thanks!!!

 

7 REPLIES 7
danextian
Super User
Super User

Hi @Hello_masters 

This isn't possible out of the box. Matrix in Power BI behaves similarly to a pivot table in Excel. You will need to use a disconnected table and extra measures to return the desired value. And another disconnected table for the MIN filter. Please see attached sample pbix

danextian_0-1727756012174.png

 










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

That looks good. However, the "min" value does not change based on the period I select. For e.g. If I only select Nov and Min value is between 500 and 5000, it should show me these colors which are more than 500 in Nov. since now Min is only calculated based on Nov. 

Hello_masters_1-1727767395300.png

This is what your current code is showing when I select only Nov, and "min" is between 500 and 5000. It is based on a fixed calculated Min. 

Hello_masters_0-1727767369313.png

Also, is there a way I can sort this mean in ascending or descending order?

Hello_masters_2-1727767621156.png

 

That is because the  Min Value has a table modifier applied to it which makes it return the minimum monthly value of allselected months - ALLSELECTED ( Dates[Short Month], Dates[Month Number] )

Min Value = 
CALCULATE (
--create a virtual table of [SO Count]  summarized by short month and return the min value
    MINX (
        ADDCOLUMNS (
            SUMMARIZE ( Dates, Dates[Short Month] ),
            "@transactions", [SO Count]
        ),
        [@transactions]
    ),
--apply that min value to allselected months
    ALLSELECTED ( Dates[Short Month], Dates[Month Number] )
)

I've updated the pbix. Please try inspecting the measure used in the matrix as well as how it is being sorted by and based on what and the external measures being referenced.

danextian_0-1727773948458.png

 










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Hi, is it okay if I send my file over as I am not able to translate what you did to my dashboard. I'm super new to this. Also, the MIN goes missing when I select a single month:

Hello_masters_0-1728708655396.png

 

Hi @Hello_masters ,

If you are unsure how to upload data please refer to

How to provide sample data in the Power BI Forum - Microsoft Fabric Community

Make sure your .pbix file does not contain sensitive data and displays the expected results in a picture.

 

Best Regards,
Wenbin Zhou

Hi,

I am not sure how much i can help but i'd like to try.  Share the download link of the PBI file with a small dataset and show the expected result there.


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

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.