Forum Discussion

shayla's avatar
shayla
Frequent Visitor
2 years ago
Solved

Lowest/ Highest value

Hi All, 

 

Instead having the lowest discount in the whole column, I would like to have the lowest discount % in the year as well.

 

how anyone help with it?

 

Thanks!

 

 

  • HI, shayla 

     

    try below

    calculate(
    min(table[discount%]),
    table[year] = max(table[year])
    )

3 Replies

  • Dangar332's avatar
    Dangar332
    Resident Rockstar

    Hi, shayla 

    try below

    column =
     minx(
        filter(
           all(table),
           table[year]= max(table[year])
        ),
        'table'[discount%]
      )
    • shayla's avatar
      shayla
      Frequent Visitor

      Thanks for reply! @Dangar33

       

      when I put the formular below, it only gives the max discount% in 2023, but I need max/min for every year..

       

      could you please rectify my formula?

       

      Thanks!

       

      • Dangar332's avatar
        Dangar332
        Resident Rockstar

        HI, shayla 

         

        try below

        calculate(
        min(table[discount%]),
        table[year] = max(table[year])
        )