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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Credo
Helper I
Helper I

New Product Sales for first 3 month

Cant seem to figure this out 

 

I have a simple sales table 

 

Date of sale / Product name / Sales

 

I need to keep track of sales for new products for 3 months. So if a product first began selling on January 1st than I need to track it until April 1st. 

 

How can I do this?

 

Thanks for your help! 

 

 

1 ACCEPTED SOLUTION
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @Credo,

 

Please refer to below DAX to new calculated columns.

first sale time =
CALCULATE (
    MIN ( table5[Date of sale] ),
    ALLEXCEPT ( table5, table5[Product name] )
)

3 months later =
DATEADD ( table5[first sale time].[Date], 3, MONTH )

Sum sales =
CALCULATE (
    SUM ( table5[Sales] ),
    FILTER (
        ALLEXCEPT ( table5, table5[Product name] ),
        table5[Date of sale] >= table5[first sale time]
            && table5[Date of sale] < table5[3 months later]
    )
)

1.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
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-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @Credo,

 

Please refer to below DAX to new calculated columns.

first sale time =
CALCULATE (
    MIN ( table5[Date of sale] ),
    ALLEXCEPT ( table5, table5[Product name] )
)

3 months later =
DATEADD ( table5[first sale time].[Date], 3, MONTH )

Sum sales =
CALCULATE (
    SUM ( table5[Sales] ),
    FILTER (
        ALLEXCEPT ( table5, table5[Product name] ),
        table5[Date of sale] >= table5[first sale time]
            && table5[Date of sale] < table5[3 months later]
    )
)

1.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
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.