DAX Function Guide

REPT
Empty image or helper icon

Sam McKay

CEO & Founder

How does the REPT 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?

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

Related Blog Posts

Loading

Considerations when using the REPT?
  • 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

Loading

Formula examples using the REPT

= REPT(“AB”,5)

=REPT([MyText],[MyNumber])

Related Courses

Loading