Forum Discussion
Estefania89
10 years agoNew Member
PREVIOUSMONTH
Hello! Attempt to calculate the sales of the previous month using this function: SP= CALCULATE ( SUM ( Table1 [number ] ) ; previousMonth (Table 2 [DATA ] ) ) However, the function does not ret...
- 10 years ago
Finally you can use your measure:
SP= CALCULATE ( SUM ( Table1 [number ] ) ; previousMonth (CalendarTable [DATE ] ) )
Estefania89
10 years agoNew Member
Thank you for answering!
i have a data table and a data fact, how ever no relationship was detected!
Vvelarde
10 years agoCommunity Champion
Hi, can you post a screenshot with tables and relationship?.
- Estefania8910 years agoNew Member
- Vvelarde10 years agoCommunity Champion
Hi Estefania89 you need a date Table with each day like a calendar.
To create a calendar table you can use:
Create a new Table (From Modeling)
CalendarTable=Calendar("01/01/2015";31/12/2016") you can change the dates according to your tables.
Next, create a relationship between date columns on your tables and Calendar Table.
- Vvelarde10 years agoCommunity Champion
Finally you can use your measure:
SP= CALCULATE ( SUM ( Table1 [number ] ) ; previousMonth (CalendarTable [DATE ] ) )