cancel
Showing results for 
Search instead for 
Did you mean: 
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
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

BizApps LATAM 2023

Business Application LATAM Summit 2023

Join the biggest FREE Business Applications Event in LATAM this February.

Power Platform Bootcamp

Global Power Platform Bootcamp

In this bootcamp we will deep-dive into Microsoft’s Power Platform stack with hands-on sessions and labs, delivered to you by experts and community leaders.

Top Solution Authors
Top Kudoed Authors