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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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

Hi @cperazza ,

 

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

 

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.