Forum Discussion
Line Chart displays wrong dates with TTM measure
- 8 years ago
After doing some more digging Mr. Ferrari at SQLBI was able to help out. Adding this bolded and italicized portion to the forumla did away with the unwanted dates, and is also the most efficient way to make the calculation (compared to an IF statement that would excluded the dates not selected).
v-yulgu-msft thank you for your help regardless!TTM Total Sales = DIVIDE( [Total Sales], [Total Sales] ) * CALCULATE ( [Total Sales], DATESBETWEEN ( 'Calendar'[Date], NEXTDAY ( SAMEPERIODLASTYEAR ( LASTDATE ( 'Calendar'[Date] ) ) ), LASTDATE ( 'Calendar'[Date] ) ) )
v-yulgu-msft, thank you for your response, unfortunately this does not correct the issue.
- bdurham158 years agoFrequent Visitor
After doing some more digging Mr. Ferrari at SQLBI was able to help out. Adding this bolded and italicized portion to the forumla did away with the unwanted dates, and is also the most efficient way to make the calculation (compared to an IF statement that would excluded the dates not selected).
v-yulgu-msft thank you for your help regardless!TTM Total Sales = DIVIDE( [Total Sales], [Total Sales] ) * CALCULATE ( [Total Sales], DATESBETWEEN ( 'Calendar'[Date], NEXTDAY ( SAMEPERIODLASTYEAR ( LASTDATE ( 'Calendar'[Date] ) ) ), LASTDATE ( 'Calendar'[Date] ) ) )