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
cperazza
Frequent Visitor

COUNT UNIQUE ITEMS PER ORDER/PER CLIENT + INTERVAL BETWEEN ORDERS

Hello team,

 

After a quick research and a few attempts, I'm still struggling to find the solution I need.
Maybe it's a simple question for more experienced users, but I'm finding it hard to find the solutions to my problem.

My report has a single dataset (or table) that combines sales transactions from 3 clients.

Each row of my dataset is one item of an order, and the table structure is the same for those three clients.

The fields I have on my dataset are:

- reward_program_code (or client ID)

- account_id (which is the customer ID from my client side)

- member_uid (which is the customer ID from my side)

- account_reference (which is the customer ID that the system creates when combining the account_id + member_uid)

- order_number (unique identifier of each order)

- transaction_date (date of purchase)

- SKU (unique product identifier)

- product_name (product name from my client system)

- product_category (name of product category from m y client system)

- quantity (units sold for that product SKU, on that order)

- total_cost (cost of sales from my client)

- total_sell (total revenue per item on that order)

 

cperazza_0-1670355822568.png

 

I'm creating a set of measures that will be used on a dashboard, such as:

- total revenue (sum of total_sell)

- order frequency (distinct count of order_id)

- revenue per order (total_sell divided by the distinct count of order_id)

- total quantity per order (sum of quantity per order_id)

 

I am struggling with two measures:

 

1) count the number of unique products sold per order (distinct count of SKU per order_id).

2) measure the number of days between the last 2 orders for each member_uid.

 

Can anyone help me with that? Would be great if I could add to those measures a filter by client (reward_program_code) as well.

Thanks in advance!


1 REPLY 1
v-jayw-msft
Community Support
Community Support

Hi @cperazza ,

 

Please share some sample data so that we could test the formula.

 

 

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

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.

Top Solution Authors