Forum Discussion

Richard_Clipsto's avatar
Richard_Clipsto
Frequent Visitor
1 year ago
Solved

Column with maximum amount per category

Hi,

 

I am struggling with a calculated column. I have one column of dates, one with properties, and one with passing rents. I want a column which gives the maximum rent achieved for each property. So this would be the same figure for all time periods for a property but would be different for each property. Then in my table I can see the passing rent for each property at a specific date and then the maximum rent achieved.

 

e.g. what I want to achieve

 

PropertyDateRentMax Rent
A31/01/2024200250
A29/02/2024200250
A31/03/2024250250
B31/01/2024150180
B29/02/2024180180
B31/03/2024180180

 

Thanks,

 

Richard

3 Replies

  • Hi Richard_Clipsto 

    Calculated column highest rent =

    var currProp = [Property]

    return

    calculate(
    max(table[max rent])

    ,table[property] = currProp )

     

    That should create a calculated column that shows next to each property the highest rent it has ever been regardless of date.

     

    If you wanted a measure it would be slightly different:

    measure highest rent =

    var currProp = selectedvalue(table[Property])

    return

    calculate(
    max(table[max rent])

    ,all(table)

    ,table[property] = currProp )