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
Anonymous
Not applicable

Advanced DAX - Sales First 365 Days

Hello, 

 

Downloadable PBIX File Link: https://drive.google.com/file/d/1S4GrIimMe0lvc3MdVf9HM0ZN-Ze6ykg6/view?...

Context: I am trying to iterate on my DAX, in order to show sales for the first 365 days for a book, beyond 365 days of the published date. 

Model

Kevthebandit_0-1668781362320.png

 

Canvas: How can I get my 'Sales First 365 Days' Measure to not be blank in the table? The Measure is working as wanted in the bar chart. 

Kevthebandit_1-1668781420997.png

 

Any links or hints is much appreciated!

 

 

 

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Based on what I got from subject

 

Measure =
calculate(Sum('Fact book Sales'[Sales Amit]), Filter('Fact book Sales', 'Fact book Sales'[Sales Date] >= related(bookDIm[Published Date]) && 'Fact book Sales'[Sales Date] <= related(bookDIm[Published Date]) +365))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Thank you. That is what I was looking for  @amitchandak


test =

CALCULATE (

    SUM ( 'Fact Book Sales'[Sales Amt] ),

    FILTER (

        'Fact book Sales',

        'Fact book Sales'[Sale Date] >= RELATED ( DimBook[Published Date] )

            && 'Fact book Sales'[Sale Date]

                <= RELATED ( DimBook[Published Date] ) + 365

    )

)

 


 

 

 

amitchandak
Super User
Super User

@Anonymous , Based on what I got from subject

 

Measure =
calculate(Sum('Fact book Sales'[Sales Amit]), Filter('Fact book Sales', 'Fact book Sales'[Sales Date] >= related(bookDIm[Published Date]) && 'Fact book Sales'[Sales Date] <= related(bookDIm[Published Date]) +365))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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