Forum Discussion
bob57
3 years agoHelper IV
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...
- Anonymous3 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
bob57
3 years agoHelper IV
This solution works beautifully! Now I have to figure out how it works. Thank you so much!
Anonymous
3 years agoNot applicable
basically, in the MINX,in table selection , you want to filter the table first to show it - 1 row
hence using the earlier , since we used eralier([rating]) this will show 1 row before, the earlier can be used with ealier([rating],2) to show 2 rows before...
hence we filtered the table to show the earlier result and substract current wit hearlier ,then we want to go from down to up so we use MINX to pick up the last one instead of going from up to down, in that case you will use MAXX like the example below: