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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Codemunchkin
Frequent Visitor

Require a whole number from List.Max() so that I can use it in List.Repeat() function

Hi, 

 

I am stuck with this 😞

 

I am trying to get a whole number value of max value of a column of a different table using List.Max(). This function returns a list but I want a number (such as Table.RowCount() function) so that I can put that in List.Repeat() function ideally I want to replace this formula --> List.Repeat(List.Numbers(1, 4),4) with List.Repeat(List.Numbers(1, List.Max()) ,Table.RowCount(#"SKU COUNT")).

 

 

1 ACCEPTED SOLUTION
mahoneypat
Microsoft Employee
Microsoft Employee

Here is an example of the needed syntax to get a list.

 

= List.Repeat(List.Numbers(1, List.Max(NumberTable[NumberColumn])), Table.RowCount(NumberTable))

 

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

2 REPLIES 2
mahoneypat
Microsoft Employee
Microsoft Employee

Here is an example of the needed syntax to get a list.

 

= List.Repeat(List.Numbers(1, List.Max(NumberTable[NumberColumn])), Table.RowCount(NumberTable))

 

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Thanks so much Pat!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors