Forum Discussion

Irwan's avatar
Irwan
Super User
2 years ago
Solved

Automatically Generate Number as Row Value

Hello Power BI Expert, need an advice about DAX.

 

I am trying to create a new table with one column but with vary row value depends on one condition. Let's say the condition is 15 (or max hours in below case), so I am trying to make a new table with 15 rows contained value of 1-15 for each row.

My problem is, is there any way to create the same table without writing the number one-by-one?

Thank you and really appreciate for the help.

  • You can use following dax to creat a table 

    Hours = GENERATESERIES(1,15,1)

2 Replies

  • Jack_D's avatar
    Jack_D
    Frequent Visitor

    You can use following dax to creat a table 

    Hours = GENERATESERIES(1,15,1)
    • Irwan's avatar
      Irwan
      Super User

      hello Jack_D ,

      that works wonderfully.

      Thanks and appreciate for the help.