Forum Discussion
devaverma
1 year agoNew Member
Facing issue with DATEADD function
Hi all, I am a beginnering and try to flow previous year cost using DATEADD function. But, I am not getting the desired results. I am sharing the screenshot of the result that I am getting. Pleas...
- 1 year ago
Hi,
Try this approach
- Create a Calendar table with calculated column formulas for Year, Month name and month number
- Create a relationship (Many to One and Single) from the Date column of the Fact table to the Date column of the Calendar table
- To your visual/filter/slicer, dray Year/Month name from the Calendar table
- Write this measure
Measure = calculate([Cost of logistics],previousmonth(calendar[date]))
Ashish_Mathur
1 year agoSuper User
Hi,
Try this approach
- Create a Calendar table with calculated column formulas for Year, Month name and month number
- Create a relationship (Many to One and Single) from the Date column of the Fact table to the Date column of the Calendar table
- To your visual/filter/slicer, dray Year/Month name from the Calendar table
- Write this measure
Measure = calculate([Cost of logistics],previousmonth(calendar[date]))