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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Sakthikumar
Regular Visitor

How to add a Minimum and Maximum value in Row in Matrix

Sakthikumar_0-1725347761444.png

I have created the above table visual by placing the Category & Manu as Rows and Date as column and Measure [Monthly%] in Values. I want to calculate the Row wise Maximum and Minimum values and those columns need to appear on the right side 

Monthly% = IF(OR([Percent_of_Parent_Row_Total_SIM]<>BLANK(),[Percent_of_Parent_Row_Total_BAU]<>BLANK()),[Percent_of_Parent_Row_Total_BAU] -[Percent_of_Parent_Row_Total_SIM],0)

Percent_of_Parent_Row_Total_BAU =
DIVIDE(
    [Sales_BAU],
    CALCULATE(
        [Sales_BAU],
        ALLSELECTED(Base[MANU])
    ),
    0
)
 
Percent_of_Parent_Row_Total_SIM =
DIVIDE(
    [Sales_SIM],
    CALCULATE(
        [Sales_SIM],
        ALLSELECTED(Base[MANU])
    ),
    0
)
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Sakthikumar ,

 

I think you can try to add min and max measures into value fields.

 

MIN =
VAR _SUMMARIZE =
    SUMMARIZE (
        ALLSELECTED ( 'TableName' ),
        [Category],
        [MANU],
        [Date],
        "Monthly%", [Monthly%]
    )
RETURN
    MINX (
        FILTER (
            _SUMMARIZE,
            [Category] = MAX ( 'TableName'[Category] )
                && [MANU] = MAX ( 'TableName'[MANU] )
        ),
        [Monthly%]
    )
MAX =
VAR _SUMMARIZE =
    SUMMARIZE (
        ALLSELECTED ( 'TableName' ),
        [Category],
        [MANU],
        [Date],
        "Monthly%", [Monthly%]
    )
RETURN
    MAXX (
        FILTER (
            _SUMMARIZE,
            [Category] = MAX ( 'TableName'[Category] )
                && [MANU] = MAX ( 'TableName'[MANU] )
        ),
        [Monthly%]
    )

 

Turn off Text Wrop.

vrzhoumsft_0-1725433135203.png

vrzhoumsft_1-1725433207699.png

Then change the column width which you don't need to 0.

vrzhoumsft_2-1725433254157.png

 

Best Regards,
Rico Zhou

 

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

 

 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Sakthikumar ,

 

I think you can try to add min and max measures into value fields.

 

MIN =
VAR _SUMMARIZE =
    SUMMARIZE (
        ALLSELECTED ( 'TableName' ),
        [Category],
        [MANU],
        [Date],
        "Monthly%", [Monthly%]
    )
RETURN
    MINX (
        FILTER (
            _SUMMARIZE,
            [Category] = MAX ( 'TableName'[Category] )
                && [MANU] = MAX ( 'TableName'[MANU] )
        ),
        [Monthly%]
    )
MAX =
VAR _SUMMARIZE =
    SUMMARIZE (
        ALLSELECTED ( 'TableName' ),
        [Category],
        [MANU],
        [Date],
        "Monthly%", [Monthly%]
    )
RETURN
    MAXX (
        FILTER (
            _SUMMARIZE,
            [Category] = MAX ( 'TableName'[Category] )
                && [MANU] = MAX ( 'TableName'[MANU] )
        ),
        [Monthly%]
    )

 

Turn off Text Wrop.

vrzhoumsft_0-1725433135203.png

vrzhoumsft_1-1725433207699.png

Then change the column width which you don't need to 0.

vrzhoumsft_2-1725433254157.png

 

Best Regards,
Rico Zhou

 

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

 

 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.