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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

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
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.