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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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