Forum Discussion

key_to's avatar
key_to
Advocate I
3 years ago
Solved

Convert measure to column

Hi,   I created a measure that works fine for each individual row, but the total sum and total average by division are wrong. Therefor I need to convert the measure into the column. Therefore I nee...
  • key_to's avatar
    key_to
    3 years ago
    I have found a solution for my issue and posting it here in case somebody else comes accross similar issue as me.
    Adjusted BaseSalary NOK column =
     VAR currentRowDate = 'PBI Compensation'[Date]
     VAR currentSalary = 'PBI Compensation'[BasePay in NOK]
     VAR previousSalary = LOOKUPVALUE('PBI Compensation'[BasePay in NOK], 'PBI Compensation'[SuccessFactor ID], 'PBI Compensation'[SuccessFactor ID], 'PBI Compensation'[Date], CALCULATE(MAX('PBI Compensation'[Date]), FILTER('PBI Compensation', 'PBI Compensation'[Date] < currentRowDate)))
     RETURN IF(ISBLANK(currentSalary), previousSalary, currentSalary)