Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to create a table with the below information:
Date, Sales, Sales (Last Year Same Day)
01/12/2016, 50, 21
02/12/2016, 23, 21
..
..
for Sales (Last Year Same Day) I am trying the below formula:
Sum(
{<
[Date]={$=(Max([Date])-364)}
>}
Sales
)
This is just bringing '0'. I tried lot of options but it don't work at all.
Any help?
Try
Sum(
{<
[Date]={"$(=date(addyears(Max([Date]),-1)))" }
>}
Sales
)
SUM({<YourDateField = {'$(=Date(AddYears(Max(YourDateField),-1))'}>}Sales)
this works fine when there is no master calendar. Once I use one; it shows zero values then.
Master calendar has other columns as well like Quarter, Year, Month etc along with Date.
Hello Mohammad,
you don't want to use.. -364 like this...
we have a...calendar functions like...addyears and addmonths to play on date fields.
Try your expression like this...
sum({<Your Date filed={$(=AddYears(Today(),-1))}>}[Final Price])
or
sum({<Your Date Field={$(=AddYears(Max(YourDateField),-1))}>}[Final Price])
I tried as you suggested and it shows zero.
If possible share sample app
I have designed a sample App. How to share it here?
click on Reply - > Use Advanced Editor on top right corner - > attach at bottom right corner
Pls. find the sample app. The only sheet shows a filter of Month and the table shows day wise sales for each day of the month.