Forum Discussion
SEARCH + What-if + multiple tables
- Anonymous8 years ago
GellaiTamas,
Create the following column in Vehicle_cost table.
CheckTrailer = IF(ISERROR(SEARCH("Trailer",Vehicle_costs[Vehicle])),0,1)
Then create the following measures in Vehicle_cost table.
Measure = MAX(Uniform1[Annual])
Uniform Cost = IF(MAX(Vehicle_costs[CheckTrailer])=1,0,[Measure]*[# of vehicle Value])
Regards,
Lydia
Anonymous
Hi Lydia,
Thanks for the code. Unfortunately it produces the following error:
A single value for column 'Vehicle1' in table 'Vehicle_costs' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.
BR,
Tamás
GellaiTamas,
Right click your table, choose "New Column" and apply the DAX.
Regards,
Lydia
- GellaiTamas8 years agoHelper I
Anonymous
Hi Lydia,
Unfortunately I get the same error message when applying the DAX for a new column.
Thanks,
Tamas
- Anonymous8 years agoNot applicable
GellaiTamas,
Create the following column in Vehicle_cost table.
CheckTrailer = IF(ISERROR(SEARCH("Trailer",Vehicle_costs[Vehicle])),0,1)
Then create the following measures in Vehicle_cost table.
Measure = MAX(Uniform1[Annual])
Uniform Cost = IF(MAX(Vehicle_costs[CheckTrailer])=1,0,[Measure]*[# of vehicle Value])
Regards,
Lydia - GellaiTamas8 years agoHelper I
Anonymous
It works. Thanks a million, Lydia!