Forum Discussion
sd22
2 years agoFrequent Visitor
Need Help with Dax
Hi All, I need to present data in form of curr month -1 , curr month and curr month +1 Below is the dataset containing sales of prev month curr month and curr+1 month (predicted) I wan...
sd22
2 years agoFrequent Visitor
Hi mlsx4,
Thankyou for your response . But the data contains data for past 3 years and I only want to show data for curr month-1, curr month and curr month+1. It has to be dynamic . Can you kindly help me with that please.
Appricate your efforts.
Thanks & Regards
Shrey
- mlsx42 years agoMemorable Member
Hi sd22
You can create an Offset column which does this:
Offset = var currentMonth= MONTH(TODAY()) return IF(MONTH(MyTable[Date])=currentMonth, 1 , IF(MONTH(MyTable[Date])=(currentMonth-1),1, IF(MONTH(MyTable[Date])=(currentMonth+1),1,0)))And then put a filter in the pane for your graph <Offset=1>