# "Error in calculation when using fct\_reorder: .f must be a factor or character vector, not a function"

**URL:** <https://community.exploratory.io/t/error-in-calculation-when-using-fct-reorder-f-must-be-a-factor-or-character-vector-not-a-function/4227>\
**Category:** Issues\
**Created:** [May 5, 2026, 11:47pm UTC](https://community.exploratory.io/t/error-in-calculation-when-using-fct-reorder-f-must-be-a-factor-or-character-vector-not-a-function/4227 "2026-05-05T23:47:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Takato\_Shiroto](https://community.exploratory.io/user_avatar/community.exploratory.io/takato_shiroto/32/749_2.png) [@Takato\_Shiroto](https://community.exploratory.io/u/Takato_Shiroto)\
**Post date:** [May 5, 2026, 11:47pm UTC](https://community.exploratory.io/t/error-in-calculation-when-using-fct-reorder-f-must-be-a-factor-or-character-vector-not-a-function/4227/1 "2026-05-05T23:47:42Z")

</div>

### Problem

When you run a calculation that uses `fct_reorder` in the “Create Calculation” step, you may see an error like the following.

```auto
Error in mutate(., filter = fct_reorder(vars, vars_order)) : ℹ In argument: `filter = fct_reorder(vars, vars_order)`.Caused by error in `fct_reorder()`:! `.f` must be a factor or character vector, not a function.

```

### Cause

The error occurs because the column passed to `fct_reorder` (in the example above, `vars`) does not exist in your current data.

### Solution

Specify column names that actually exist in your data as the arguments to `fct_reorder`.

```auto
fct_reorder(<column to reorder>, <column that determines the order>)

```

For example, to reorder `product_name` by the `sales` column, write it as follows.

```auto
fct_reorder(product_name, sales)

```

For more information on how to set the order of values, please also refer to the note below.

> **[How to Set Value Order](https://ja.exploratory.io/note/exploratory/How-to-Set-Value-Order-Nac6fLi1)**
>
> Created by Takato Shiroto
