Forum Discussion
Issue Cumulative Sales based on Week
Cumulative Revenues LY =
Var MaxDate = MAX('Dim Calender Sales Invoice'[Date])
Var LastYear = YEAR(TODAY())-1
Return
Calculate([Total Revenues LY];
ALL('Dim Calender Sales Invoice');
'Dim Calender Sales Invoice'[Year] = LastYear;
'Dim Calender Sales Invoice'[Date] <= MaxDate
)
If you have the correct relationship between yout invoice table and your calendar this should work i believe.
- Anonymous7 years agoNot applicable
Hi,
thanks for your quick response.
Your measure works when i visualize this:
But my wish is to make a chart where the following result without using column Date:
unfortuantly you see that the amount of 45 million comes on every row....
any suggestions ? thanks
- tex6287 years agoCommunity Champion
Create a week column in you datetable:
Week = WEEKNUM(Calendar[Date];2)
Use it instead of the "Week of Year" column that you are currently using or do you have to use a week column that is outside of the calendar table?
- Anonymous7 years agoNot applicable
Hey it still doestn work...
it still give me the same amount of 45 mil on every row based on your suggested calculated colum in the same date table.
I dont bother to use a a week column inside or outside the table