Forum Discussion

ViktorL's avatar
ViktorL
Frequent Visitor
7 years ago
Solved

Modify Value in row based on value in other row

I have financial data and the cost of one entity is supposed to be divided among the others.   All data is in columns as follows: AccountNum | Sub Category | Category | Entity | Date | EUR   Con...
  • v-danhe-msft's avatar
    v-danhe-msft
    7 years ago

    Hi ViktorL ,

    Based on my test, you could refer to below formula:

    True EUR = var a=CALCULATE(SUM(Table1[EUR]),FILTER('Table1','Table1'[Category]="Depreciation"&&'Table1'[Enitity]="EntityCENTER"))
    var b=CALCULATE(SUM(Table1[EUR]),FILTER('Table1','Table1'[Category]="General Overhead"&&'Table1'[Enitity]="EntityCENTER"))
    Return IF([Enitity]="Enitity1"&&'Table1'[Category]="Depreciation",[EUR]+a*0.4,
            IF([Enitity]="Enitity2"&&'Table1'[Category]="General Overhead",[EUR]+b*0.6,
            IF([Enitity]="Enitity1"&&'Table1'[Category]="General Overhead",[EUR]+a*0.6,
            IF([Enitity]="Enitity2"&&'Table1'[Category]="Depreciation",[EUR]+b*0.6))))

    Result:

    You could also download the pbix file to have a view.

     

    Regards,

    Daniel He