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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
TonyGu
Helper I
Helper I

Question about new Customers

Hey All, 

 

Was wondering if anyone could help me with figuring out a measure for calculating new customers. I run Count Rows on the below query when running it on the desktop file. Credit to Alberto Ferrari for this measure.

 

 

 

 

EVALUATE
(
    FILTER (
        CALCULATETABLE (
            SUMMARIZE (
                'Transactions',
                'Transactions'[Customer ID],
                "First Trans",
                    CALCULATE (
                        MIN ( 'Transactions'[Transaction Date] ),
                        'Transactions'[Amount] > 0
                    )
            ),
            ALL ( Dates )
        ),
        CONTAINS (
            VALUES ( Dates[Date] ),
            DimDates[Date], [First Trans]
        )
    )
)

 

 

 

 

This works pretty well when calculating against date. The output in DAX Studio seems to give the correct dates for each customer. 

 

I have a Category ID in Transactions table for which product category the customer purchased. Category ID from Trasactions table connects to DimCategory which has "Category Name". I want to see new customers by Category,

 

Let's say I have a customer who made his first purchase on 1st Jan buying items from both Category 1 and 2. Then he purchased from Category 3 on 3rd Jan.

 

The count of new customers for Jan should be 1 and both category ID 1 and 2 should have a count of 1 for new customer. (The total new customer need not match the breakdown as long as it makes sense). Category 3 should not be part of the measure as his "First Trans" was 1st Jan

0 REPLIES 0

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.