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

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

Reply
Anonymous
Not applicable

Count rows based on two matching columns (static number)

Hello,

 

I am running into a bit of trouble creating a report of returned items. The report I am creating will show me the items returned in the last seven and the number of times they have been back historically. It would show something like the following: 

 

Part Number | Serial Number | Date of return | Number of times returned

 

If I filter the data on the reports page I am left with 1 in the number of times returned. To help compensate for this, I've tried to manipulate a column on the data page to count the number of times a part number (Column 1) and serial number (column 2) appear in my data and use that as a reference number that won't be affected by filtering date. 

 

So far I've tried to create a COUNTROWS function and a MAXX function with no success. I'm still very new to Power BI and DAX. Any help would be greatly appreciated.

 

Thanks,

Aaron

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

Let me know if you'd like to get the result like this:

007.PNG

Pbix attached; https://wicren-my.sharepoint.com/:u:/g/personal/dinaye_wicren_onmicrosoft_com/ESvDnzL6vNdGm_xn3lkutFIBjRC75oHa6dZxwx-Fc3_dcg?e=OF1W9N

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

View solution in original post

8 REPLIES 8
Ashish_Mathur
Super User
Super User

Hi,

Share some data and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

To clarify, part number and serial number have to match to be a counted value. This is because there are similar serial numbers which have different part numbers and there are similar part numbers with different serial numbers. 

Hi @Anonymous ,

 

Please share us your dummy pbix/ simple data and the desired results. that would be easier for us to provide the valuable advice.

 

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
Anonymous
Not applicable

Hi,

What exact result do you want?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

The solution provided above works.

Anonymous
Not applicable

Let me know if those files will work, or if you might need additional data for an example.

Hi @Anonymous ,

 

Let me know if you'd like to get the result like this:

007.PNG

Pbix attached; https://wicren-my.sharepoint.com/:u:/g/personal/dinaye_wicren_onmicrosoft_com/ESvDnzL6vNdGm_xn3lkutFIBjRC75oHa6dZxwx-Fc3_dcg?e=OF1W9N

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Kudoed Authors