Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Dear All
Kindly guide on below mentioned construction example.
Table.Distinct(Table, {“b”,Comparer.OrdinalIgnoreCase})
In the above example, I cannot understand the highlighted section of the syntax. As per documentation it is 2nd argument/parameter of the syntax. As per documentation it is mentioned as "optional equationCriteria as any"
However, the actual usage as above seems like a list. But I cannot understand how list like construction can work as equation criteria. As per documentation this optional criteria specifies which column of the table is to be tested for duplication. In the above example, "b" column has been specified as column name, but comparer has been mentioned by inserting a COMMA after column name which I fail to understand. By refering to documentation I cannot guess that comparer has to be specified in this manner.
Kindly guide above construction / syntax / usage / how it works
Hi @CMMaliniJoshi,
This is exactly, what it says (to an extent 😁). The second parameter defines what the distiction means and can be any in the sense, it can be a single value (e.g. "b") or a list of values (e.g. {"b", "a"}) or a list of values with optional parameters which tells PQ to ignore or respect cases (i.e. differenciate or not between "A" and "a"). Like in your example. You can not mix signatures, i.e. this is not possible (will through an error):
Table.Distinct(#"Changed Type", {{"b", Comparer.OrdinalIgnoreCase}, "a"})
Hope this clarifies,
Kind regards,
John
Dear jbwtp
Sorry for the late revert. Thanks for the guidance. I got some idea.
Regards
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
39 | |
21 | |
20 | |
13 | |
13 |