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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
CMMaliniJoshi
Helper I
Helper I

Table.Distinct syntax

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

2 REPLIES 2
jbwtp
Memorable Member
Memorable Member

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

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors
Top Kudoed Authors