Forum Discussion
Power Query: List.Max dosn't return max value
I extracted a number from a code and converted it to number in column "NewCode". Then, I would like to create a column with the max value of "NewCode".
Then I added a new custom column:
List.Max(#"PreviousAction"[NewCode])
The thing is that the returned value is not the maximum value:
Can someone help me out?
Then I added a new column with the following code:
List.Max(#"Texto Extraído Entre os Delimitadores"[NewCode])
The thing is that the new column return a value that is not the max value:
Can someone help out?
Hi CoffeeTime ,
I made a sample about using list.Max,and it worked fine.
Be sure that you have changed your column type to "whole number".
Here is the related .pbix file.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
7 Replies
- az38Community Champion
- CoffeeTimeFrequent Visitor
But this will be used to create the table keys. Later, PBI will use it to relate different tables.
- HotChilliCommunity Champion
9 will be returned if the column is a text type so that's the clue.
Either something has gone wrong with the data type change or the wrong column is used in the List.Max or something else unusual.
Could you experiment by entering your own sample number column e.g. 2, 3,5 then add a column using similar code to the sample you posted and prove that works ok.
- Gareth123Regular Visitor
Why do you think it is better to use DAX?
- v-kelly-msftCommunity Support
Hi CoffeeTime ,
I made a sample about using list.Max,and it worked fine.
Be sure that you have changed your column type to "whole number".
Here is the related .pbix file.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!