Forum Discussion

bob57's avatar
bob57
Helper IV
3 years ago
Solved

Calculated column.

Hello, Here is the original table: I need a calculated column that will for each category display the difference in rating from the base rating for that category. Here are what the column re...
  • Anonymous's avatar
    Anonymous
    3 years ago

    hello bob57 ,
    pelase try :

    Result = 
    var _Currentcategory=Table1[Category Id]
    var _Previousrating= MINX(FILTER(Table1,Table1[Rating]<EARLIER(Table1[Rating]) && Table1[Category Id]=_Currentcategory),Table1[Rating])
    var _result=Table1[Rating]-_Previousrating
    return IF(ISBLANK(_Previousrating),0,_result)

     

     

    if you find this helpful, please consider accepting it as a solution and a kudos is appreciated