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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ACALDWELL8814
Regular Visitor

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 @ACALDWELL8814 ,

 

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_xn3lkutF...

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/
ACALDWELL8814
Regular Visitor

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 @ACALDWELL8814 ,

 

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.

Hi,

What exact result do you want?


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

The solution provided above works.

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

Hi @ACALDWELL8814 ,

 

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_xn3lkutF...

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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