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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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