Text variables are used when any description used in a query should be dynamic. For example, if your restricted key figure is defined as the quantity sold in Austria for 2023, then it would be helpful if the description of the column in the result would include the country and the year. In this case, the description would then be Quantity Sold in Austria during 2023.. If you didn't use text variables then the description would simply be Quantity Sold, which is certainly not helpful to the report consumer.
You can use text variables in query descriptions, calculated and restricted key figures, and structural components.
Text variables can be processed by the replacement path method so that they are replaced with a value from a corresponding characteristic or from a different variable at run-time. The replacement value can be determined from the Name (for example Dec 2023), from the External Key (for example, 12.2023), or from the Key (for example, 202312). Additionally, you can define an offset start and offset length for the text.