I created a graph showing the profit of each day in this month, and I am wondering how to also display the profit of same date in the previous month in this graph.
I used datetrunc in calculated field to create a new measure that returns the profit of the same date in previous month but it didn't go well...
May I ask for suggestions for solution? Thank you I will really appreciate it.
Sincerely,
Yuying
13 answers
Hi Yu Ying Lin,
Please find the attached updated workbook.
I have used the below three calculations to get the desired result :
- Previous Month : LOOKUP(ATTR([Order Date]),-1)
- Dete diff : DATEDIFF('month',[Previous Month],ATTR([Order Date]))
- Previous Value : IF [Dete diff] =1 THEN [Previous Month Profit] ELSE NULL END
Please do let me know in case of any queries and I hope matches your requirement.