Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello,
I am creating an aggregated table in Power Query using Group By functionality and once I do that I have a column that has an Average Score. When I compare this Avergage Score (it has decimal numbers) to another column that is also of decimal number type, I get an error message.
Expression.Error: We cannot apply operator < to types List and Number.
Details:
Operator=<
Left=[List]
Right=8.13
Does anyone know what mistake am i making or how to fix this?
Thank you
Solved! Go to Solution.
Hello @Anonymous
exactly, with Def[Target] you are referencing a list. Now depends what kind of calculation you want to apply. Like List.Sum, List.Max etc. you can also referencing the first item by adding {0} after your list reference
Copy paste this code to the advanced editor in a new blank query to see how the solution works. If this solution fits your need, copy and past a part of it and implement it in your query, or I could create a custom function what makes it easier to apply if you are not used that much to power query.
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
I realized that my Def[Target] is not a single number but a list of numbers. As soon as I figured out how to resolve that into a single number, the error disappeared.
Hello @Anonymous
exactly, with Def[Target] you are referencing a list. Now depends what kind of calculation you want to apply. Like List.Sum, List.Max etc. you can also referencing the first item by adding {0} after your list reference
Copy paste this code to the advanced editor in a new blank query to see how the solution works. If this solution fits your need, copy and past a part of it and implement it in your query, or I could create a custom function what makes it easier to apply if you are not used that much to power query.
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
Hi @Anonymous
The error message is quite clear. You are comparing a list and a number. Show the M code so that we can see where the mistake is.
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
= Table.AddColumn(#"Changed Type", "Indicator", each if [Score] < Def[Target] then "Met" else "Not Met")