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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Syndicate_Admin
Administrator
Administrator

Count only single cells in Power Query

I have the following situation, in column B I have identified delivery numbers which are repeated n number of times according to the number of plants in column E.

How can I count and show me If column B and column E is unique let it be = 1 if this combination is repeated it will be empty.

Can this be done in any way in Query?

Cverat_0-1719867803831.png

1 ACCEPTED SOLUTION
vicky_
Super User
Super User

For Power Query, you'll need to grab just column B and Column E, select both columns by holding CTRL or Shift while clicking, then Remove Rows > Remove Duplicates

vicky__0-1719872130510.png

vicky__1-1719872253372.png

then go to Transform > Count Rows. You can close and apply after that.

You can also do it in DAX. Load in your data as normal (after applying any transformations that you already had), then use the following measure: 

Unique Combinations = COUNTROWS(DISTINCT(SELECTCOLUMNS('Table', 'Table'[Column B], 'Table'[Column E]))) 

 

View solution in original post

1 REPLY 1
vicky_
Super User
Super User

For Power Query, you'll need to grab just column B and Column E, select both columns by holding CTRL or Shift while clicking, then Remove Rows > Remove Duplicates

vicky__0-1719872130510.png

vicky__1-1719872253372.png

then go to Transform > Count Rows. You can close and apply after that.

You can also do it in DAX. Load in your data as normal (after applying any transformations that you already had), then use the following measure: 

Unique Combinations = COUNTROWS(DISTINCT(SELECTCOLUMNS('Table', 'Table'[Column B], 'Table'[Column E]))) 

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.