Ecto model calculated field Mar 4, 2016 This example shows a common approach to having a calculated field for a model. defmodule User do use Ecto.Schema schema "users" do field :first_name, :string field :last_name, :string end # Example calculated field def full_name(user) do user.first_name <> " " <> user.last_name end end