Forum Discussion

Sakthikumar's avatar
Sakthikumar
Frequent Visitor
2 years ago
Solved

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

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
)
  • Anonymous's avatar
    Anonymous
    2 years ago

    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.

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

     

    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.

     

     

1 Reply

  • Anonymous's avatar
    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.

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

     

    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.