Forum Discussion
To calculate previous month and current month average value.
You should have seperate dimension date table staringting from Jan 1st to 31st december (one to many relation with fact table) in order to use DAX date functions without errors.
Try using DATEADD() function... This is best one to alter date table.
Hope this helps... Else post sample data and expected results pic so that we help further
Regards
Afzal kha
- afaque038 years ago
Helper I
I tried this function
Average Last Month = CALCULATE(SUM('Purchase Data'[Total]),DATEADD('Purchase Data'[Order Date],-1,MONTH))
This didnt worked for me
- afzalphatan8 years ago
Resolver I
You need to have seperate Date table from Jan 1st to Dec 31st and then.... connect it with ur fact table ... later ur can use DATEADD()
for correct result....
- afaque038 years ago
Helper I
The issue is when i relate my date table with my actual table than it does not let me filter through date heirarchy.