Forum Discussion

roncruiser's avatar
roncruiser
Icon for Post Patron rankPost Patron
4 years ago
Solved

Min and Max from Column 1 based on range defined by Column2

Hello,  The max values from Column2 define the range of values I need from Column1. For example, 5 is the max value from Column2. The max value from Column1 = 6 The min value from Column1 = 2 ...
  • tamerj1's avatar
    4 years ago

    Hi roncruiser 

    I assume you will be using a card visual you may try. 

    Measure1 =
    VAR Column2Max =
        MAX ( 'Table'[Column2] )
    VAR MaxVakueTable =
        FILTER ( 'Table', 'Table'[Column2] = Column2Max )
    VAR Column1Max =
        MAXX ( MaxVakueTable, 'Table'[Column1] )
    VAR Column1Min =
        MINX ( MaxVakueTable, 'Table'[Column1] )
    RETURN
        Column1Max - Column1Min