Forum Discussion
NickProp28
Post Partisan
4 years agoLOOKUPVALUE
Dear Community, As I have two tables, DB and ActualProfit, I would like to look up the sum of DB table based on month and year into ActualProfit table, but Do not replace the numbers in Actual P...
- 4 years ago
Hey NickProp28 ,
You can try something like this:
lookup = if(ActualProfit[Profit]<> BLANK(),ActualProfit[Profit],CALCULATE(SUM('DB'[Profit]),FILTER('DB','DB'[Month]= ActualProfit[Month] && 'DB'[Year] = ActualProfit[Year] )))This will create a new column taking values from the Profit if they are already there and if not, it will do the calculation and fill the result. The outcome will be as:
Will this solve the purpose?
PC2790
Community Champion
4 years agoHey NickProp28 ,
You can try something like this:
lookup = if(ActualProfit[Profit]<> BLANK(),ActualProfit[Profit],CALCULATE(SUM('DB'[Profit]),FILTER('DB','DB'[Month]= ActualProfit[Month] && 'DB'[Year] = ActualProfit[Year] )))
This will create a new column taking values from the Profit if they are already there and if not, it will do the calculation and fill the result. The outcome will be as:
Will this solve the purpose?