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
Anonymous
Not applicable

DAX - Count by Week by Customer Based on another Measure

I'm working with two different tables, a Sales Line table and a Date Dimension. I have a measure in my Sales Line table that counts the distinct number of times a Sales Order # appears (Ex: US1234---since it is sales line it can appear multiple times). 

 

Measure name: DistinctSalesOrders

 

I want to count the number of times a customer orders more than once in a week. 

 

Ex: 

CustomerSales OrderProductquantitydate
XYZUS1234a11/1/2014
XYZUS5555b21/2/2014
XYZUS4444c31/3/2014

 

Week 1 the customer ordered three times.. therefore I would count this as 1. 

 

In essence, I want to  Count when distinct orders by customer is > 1 in a given week.

1 REPLY 1
Ashish_Mathur
Super User
Super User

Hi,

 

Share a larger dataset and show the expected result.


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

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.