Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 216067

Get Last Year Month using DateAdd DAX from Calculated New Column

$
0
0

Hi Experts,

 

Firstly i have created one new calculated DAX column to know last date from the table

Site_LastMonthDate = Max(DB[MonthName])

 

 

Now going to take Same month using below calculated column  (DAX) for previous year based on Site_LastMonthDate (which is already calculated field to get last month inthe table)

 

Site_LasYearLastMonthName = DATEADD(DB[Site_LastMonthDate].[Date],-12,MONTH)

 

This above function is not working for the last 12 months name but if i run this for the same year like previous month like Site_LasYearLastMonthName = DATEADD(DB[Site_LastMonthDate].[Date],-1,MONTH) then this works.

 

It is very surprising. Can someone help me in this on urgent basis if possible.

 


Viewing all articles
Browse latest Browse all 216067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>