# Set Variable

The action will set a variable value based on the manually entered text/expression or selected dimension/measure.&#x20;

{% hint style="info" %}
Variable will be created during the action execution if it was not created before.
{% endhint %}

![](https://4159443657-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lb8fteihZN5J-edUC8e%2F-LbT5f6ypplx_554A60T%2F-LbT6J0T79ELsINtixc-%2Fimage.png?alt=media\&token=6438b808-9d1e-4a13-8377-728f34f0474b)

In the “**Variable**” parameter you can specify a variable name by selecting a variable from the list by clicking the <img src="https://4159443657-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lb8fteihZN5J-edUC8e%2F-LbT5f6ypplx_554A60T%2F-LbT6YDCcYxxkaCKf2PX%2Fimage.png?alt=media&#x26;token=27515aba-67e5-4397-8ec5-2377a7b7660a" alt="" data-size="original"> button or entering it manually.

A Qlik expression can be used in the “Variable” parameter by prefixing a variable with an equals sign, e.g.:

```
=if(someCondition, 'var1', 'var2')
```

In the “**Value**” parameter you can manually enter a value or select a dimension/measure by clicking the<img src="https://4159443657-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lb8fteihZN5J-edUC8e%2F-LbT5f6ypplx_554A60T%2F-LbT7mBv6m1TKfPcUw97%2Fimage.png?alt=media&#x26;token=14f034b9-efb3-471d-8876-27b149ec5892" alt="" data-size="original"> special button. A Qlik expression can be used by prefixing a value with an equals sign.
