In DEA models, it is assumed that the nature of the data in terms of input and output is precisely known, While in real cases some factors can be considered as both input and output, they are called flexible measures. In the proposed models, for evaluating the performance of DMUs with flexible measures, the value of the variables is considered linear. While in real issues many inputs and outputs of DMUs, including flexible variables have nonlinear values. In other words, if the flexible measure is considered as input, its valuation will be decreasing, and if it is considered as output, its valuation will be increasing (for desirable output). In fact, decision makers seek to maximize output and minimize inputs, therefore, in calculating efficiency and also differentiating between DMUs, less value should be considered for higher amount of inputs and more value for higher amount outputs. Several DMUs may be efficient, but one of them consumes less input than other efficient DMUs to maximize output, so according to the model presented in this article, it will get a higher rank in the ranking of DMUs. So, this paper propose a new model to evaluate performance based on data envelopment analysis and a piecewise linear function in the presence of flexible variables which considers the different effect of flexible variables in efficiency evaluation and distinguishes the valuation between flexible variables as inputs and outputs. The proposed model is used to evaluate the efficiency of cement factories listed on the stock exchange.