REPT Function (DAX)

How does the REPT function (DAX) work?

The REPT function (DAX) repeats text a given number of times. Use REPT to fill a cell with a number of instances of a text string.

REPT Formula Syntax

REPT (
     <text>, <num_times>
)

How do you use the REPT function?

You can use DAX REPT function to fill a cell with a number of instances of a text string.

Related Blog Posts

Related Support Forum Posts

Aligning text values in a calculated column
Other Function Types – Information, Text, Conversion, Date & Time, Boolean
Multiple condition text search criteria

Considerations when using the REPT function

  • If number_times is 0 (zero), DAX REPT function returns a blank.
  • If number_times is not an integer, it is rounded.
  • If the result of the DAX REPT function is longer than 32,767 characters, an error is returned.
  • If you are using a text parameter directly, enclose it in double quotes.

Related Video Tutorials

Formula examples using the REPLACE function

= REPT(“AB”,5)

=REPT([MyText],[MyNumber])

Related Course Modules

Ultimate-Beginners-Guide-To-PowerBI

DOWNLOAD

To access our comprehensive DAX formula reference guide just insert your email address below. The resource will download immediately and we’ll also email it to you.