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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Bit2021
Frequent Visitor

How to find min and max value in a column with List value?

I have a table and some columns like the below:

 

Bit2021_0-1630789202043.png

I have a column with List value (item1) and I extract values with comma separate (item2) and the result is like the "pitch" column(item3).

Now I want to find Min and Max in the "pitch" column. Not each row total list. In this sample:

Max = 69.05

Min = -4.33

How can I do that? 

1 ACCEPTED SOLUTION
v-janeyg-msft
Community Support
Community Support

Hi, @Bit2021 

 

I make a sample. You can use create two columns to show your results.

Like this:

let
    Source = {{1,2,3},{4,5,6},{7,8,9}},
    #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Added Custom" = Table.AddColumn(#"Converted to Table", "Custom", each Text.Combine(List.Transform([Column1],(x)=>Text.From(x)),",")),
    #"Added Custom1" = Table.AddColumn(#"Added Custom", "Max", each List.Max(List.Combine(#"Added Custom"[Column1]))),
    #"Added Custom2" = Table.AddColumn(#"Added Custom1", "Min", each List.Min(List.Combine(#"Added Custom"[Column1])))
in
    #"Added Custom2"

vjaneygmsft_0-1631096943890.png

Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please feel free to ask me.


Best Regards,

Community Support Team _ Janey

View solution in original post

2 REPLIES 2
v-janeyg-msft
Community Support
Community Support

Hi, @Bit2021 

 

I make a sample. You can use create two columns to show your results.

Like this:

let
    Source = {{1,2,3},{4,5,6},{7,8,9}},
    #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Added Custom" = Table.AddColumn(#"Converted to Table", "Custom", each Text.Combine(List.Transform([Column1],(x)=>Text.From(x)),",")),
    #"Added Custom1" = Table.AddColumn(#"Added Custom", "Max", each List.Max(List.Combine(#"Added Custom"[Column1]))),
    #"Added Custom2" = Table.AddColumn(#"Added Custom1", "Min", each List.Min(List.Combine(#"Added Custom"[Column1])))
in
    #"Added Custom2"

vjaneygmsft_0-1631096943890.png

Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please feel free to ask me.


Best Regards,

Community Support Team _ Janey

hnguy71
Memorable Member
Memorable Member

@Bit2021 

You can use List.Min and List.Max to get the result you need. As a sample, you can create a new column with this formula to get your min and max:

Text.Combine({List.Min([roll]), List.Max([roll])}, ";")

 



Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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