As a well-developed optimization problem, the knapsack problem has been broadly applied in various fields involving resource allocations, especially production planning. In this paper, we propose a target-based distributionally robust knapsack problem (TDRKP), considering both uncertain profit and capacity, as well as the impact of a given target for profit. Based on a shortfall risk measure and piecewise utility function, the violation risk of the target is investigated. To solve the model efficiently, TDRKP is reformulated into computationally tractable form as a second-order conic program. Through a series of numerical experiments, we verify that the proposed TDRKP formulation performs better than both the sample average approximation model and the minimizing violation probabilities model.