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
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))

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))

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.