Rate of % Change

Copper Contributor

Hi guys! Need your help. I'm struggling to  formulate the % change in D A X.  I'm trying to have a measure for Daily, Week of the year, Monthly, Quarterly and yearly for comparative purposes. This is my data. 

 

 

Relationships2.jpg

 

My first option is to get the previous value for daily to get the %daily change. This is my formula, 

for

Sales= Sum([ ])

then 

for

Previous Sales = CALCULATE([Sales],DATE ADD('Calendar'[DATE],-1,DAY))

 

Take note of the fact date and Calendar date,they are different because "Date add" don't usually work in fact date or non continuous that's why I created Calendar table(continuous)

 

Untitled.jpg

This is the outlook. It did not met what I want. The Blank cells are not part of Fact Date.

 

How Can I remove those blanks? or Should I change my formula? My data sets? Please need your help!!!

 

 

Thank you!

 

1 Reply

@beeaquino 

Depends on goals. If there were no sales on previous date and blank is returned, that's correct. 

If compare to the latest date before current when sales were, you may filter on max date in fact table before current date in calendar table.

If compare to the same date in previous month that will be another measure, etc. Period comparasion patterns are here https://www.daxpatterns.com/time-patterns/