The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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!
Solved! Go to Solution.
@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.
@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.
@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.
@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.
Date | Order ID | Email Address | Product |
8/1/2023 | 1 | email1@gmail.com | Thing1 |
8/2/2023 | 2 | email2@gmail.com | Thing2 |
8/3/2023 | 3 | email1@gmail.com | Thing3 |
8/4/2023 | 4 | email3@gmail.com | Thing4 |
8/5/2023 | 5 | email3@gmail.com | Thing5 |
8/6/2023 | 6 | email4@gmail.com | Thing1 |
8/7/2023 | 7 | email5@gmail.com | Thing2 |
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).