Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Sankzpower
Helper I
Helper I

Generate number series based on total number of rows in another table

Hi guys

 

This probably a simple question but hope you can shed some light. I have a table from web api call which has over 80,000 rows plus keeps on increasing week by week. Now, I need to an another table with the same number of rows. Currently, I use the below to create series and manually increase each week or increase one off to 90,000.

 

 = GENERATESERIES(1,80000)
 
But does anyone has a better logic in increase this default?
 
Thanks in advance
1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Sankzpower ,

 

Just add the following code refering to the first table:

 


Table 2 = GENERATESERIES(1, COUNTROWS('Table'))

 

Should work as expected.

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





View solution in original post

3 REPLIES 3
MFelix
Super User
Super User

Hi @Sankzpower ,

 

Just add the following code refering to the first table:

 


Table 2 = GENERATESERIES(1, COUNTROWS('Table'))

 

Should work as expected.

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





Anonymous
Not applicable

Hi I'm using version 2.105.664.0 but this makes an error which says "The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value".
My DAX is this.
Measured Table = SELECTCOLUMNS(FILTER('MyTable', 'MyTable'[MyColumn] <> BLANK()),
"Column1", [Column1],
"Column2", [Column2],
"Column3", GENERATESERIES(1, COUNTROWS(FILTER('MyTable', 'MyTable'[MyColumn] <> BLANK()))))
 

Hi @Anonymous ,

 

Be aware that the calculation it was given was for a table, you are using a metric and metrics only return a single value so in this case you are trying to return a table, that is why it's giving you the scalar value error.

 

What is the result you want to achieve in this?is it a table?


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.