Forum Discussion
Vikki
5 years agoFrequent Visitor
Conditionally replace values in a column with a measure
Hi All, I have a problem creating a measure properly, here is the situation: I have 2 tables: My goal is, when Costing FY="Actuals", replace Costing Amount with Actual Amount, ...
- 5 years ago
Thank you for the inspiration. I made a small change of your first solution, and it worked:
if(FIRSTNONBLANK(table[Costing FY]) = "Actual" ,[Actual Amount], [Costing Amount])
Thank you,
Vikki
amitchandak
Super User
5 years agoVikki , Try a measure like below. Assuming [Actual Amount], [Costing Amount] are measures
if(max(table[Costing FY]) = "Actual" ,[Actual Amount], [Costing Amount])
or
sumx(summarize(Table,Table[Title], table[Costing FY], "_1", [Actual Amount], "_2",[Costing Amount]), if([Costing FY] = "Actual" ,[Actual Amount], [Costing Amount]))
- Vikki5 years agoFrequent Visitor
Thank you for the inspiration. I made a small change of your first solution, and it worked:
if(FIRSTNONBLANK(table[Costing FY]) = "Actual" ,[Actual Amount], [Costing Amount])
Thank you,
Vikki