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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
JustSayJoe
Advocate IV
Advocate IV

Measure Filtering Scenario

I need help getting around an issue I have with a measure getting filtered incorrectly for my purposes. See below scenario.

 

TABLE_A

Includes columns: [Email Address], [Date], [Order ID], [Product]

 

Measure is [Returning Customers] and has the following code...

  COUNTROWS(FILTER(VALUES('TABLE_A'[Email Address], DISTINCTCOUNT('TABLE_A'[Order ID]) > 1 && DISTINCTCOUNT('TABLE_A'[Product]) > 1))

 

This measure works great when I'm filtering by the Date, but when I filter by the Product it does not display the correct values. I get the why of it happening, but I can't figure out how to make this measure still give me the correct number of returning customers when filtered by Product only. Any help here would be very much appreciated. Thanks!

 

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@JustSayJoe have you seen this article?

 

I'm sure it will help to solve.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

5 REPLIES 5
parry2k
Super User
Super User

@JustSayJoe you are covered, glad it was helpful.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@JustSayJoe have you seen this article?

 

I'm sure it will help to solve.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Thank you! That article was what I've been searching for over the past 4 days.

parry2k
Super User
Super User

@JustSayJoe share the sample data and the expected output.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

DateOrder IDEmail AddressProduct
8/1/20231email1@gmail.comThing1
8/2/20232email2@gmail.comThing2
8/3/20233email1@gmail.comThing3
8/4/20234email3@gmail.comThing4
8/5/20235email3@gmail.comThing5
8/6/20236email4@gmail.comThing1
8/7/20237email5@gmail.comThing2

 

 

Expected Outcome of the [Returning Customers] Measure...
When I filter my page by Product for "Thing1", the Returning Customers should be 0.

When I filter my page by Product for "Thing2", the Returning Customers should be 0.

When I filter my page by Product for "Thing3", the Returning Customers should be 1 (because email1@gmail.com previously purchased another Product on 8/1/2023).

When I filter my page by Product for "Thing4", the Returning Customers should be 0 (even though email3@gmail.com has purchased two different products, Thing4 was their first purchased product, so they were not a returning customer yet).

When I filter my page by Product for "Thing5", the Returning Customers should be 1 (because email3@gmail.com previously purchased another Product on 8/4/2023).

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors