The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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?
Solved! Go to Solution.
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".
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".
Why do you think it is better to use DAX?
But this will be used to create the table keys. Later, PBI will use it to relate different tables.
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.
It worked.
The origin of the data is a column with codes like 2020_XX_Y. I extracted the XX into a new column and converted it to number. Do you have a suggestion why the convertion is not working with List.Max?
Post the pbix or M code and I'll have a look