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

How to track volumes from new sales per year

Hi,

 

I would like to track the first time uptake of a product by a customer in a given year e.g. 2018. The idea is to see what volumes are coming in for a product for the first time from a customer. In other words what volume of transactions in 2018 is due to new sales.

 

Source data

 

Company CompanyID Product TransactionDate

ABC1ProdA2017/01/17
ABC1ProdB2018/02/03
ABC1ProdC2017/03/01
XYZ2ProdA2017/02/01
XYZ2ProdA2017/03/01
XYZ2ProdA2017/04/01
DEF3ProdC2018/03/01
DEF4ProdB2018/04/01

 

Desired Results

 

Product FirstTimeUsage2018

ProdA0
ProdB2
ProdC1

 

Any help would be appreciated.

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@clivebredenkamp,

 

You may add the following measure.

Measure =
COUNTROWS (
    EXCEPT (
        CALCULATETABLE (
            VALUES ( Table1[Company] ),
            YEAR ( Table1[TransactionDate] ) = 2018
        ),
        CALCULATETABLE (
            VALUES ( Table1[Company] ),
            Table1[TransactionDate] < DATE ( 2018, 1, 1 )
        )
    )
)
    + 0
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-chuncz-msft
Community Support
Community Support

@clivebredenkamp,

 

You may add the following measure.

Measure =
COUNTROWS (
    EXCEPT (
        CALCULATETABLE (
            VALUES ( Table1[Company] ),
            YEAR ( Table1[TransactionDate] ) = 2018
        ),
        CALCULATETABLE (
            VALUES ( Table1[Company] ),
            Table1[TransactionDate] < DATE ( 2018, 1, 1 )
        )
    )
)
    + 0
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.