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

DAX What is SAMEPERIODLASTYEAR actually doing with the date range

$
0
0

 

Hi there,

 

I have a question about what the below Dax function is actually doing with the date range. 

 

The below DAX Function is the function for same period last year, but if the date is the 21st of this month, is the below function measuring from the 1st to the 21st or the 1st to the 31st (Full month).

 

 

LYTM Value = CALCULATE([Total Value],SAMEPERIODLASTYEAR(DATESMTD('CALENDAR'[DATE])))

 

This is the Sum

Total Value = SUM(SALES[VALUE])

 

This is the This year this month calc

TYTM Value = CALCULATE([Total Value],DATESMTD('CALENDAR'[DATE]))

 

This is the main measure, this shows negitive for most of the month, until it gets later into the month thus me questioning if the LYTM calculation is to the date last year or to the full month of the date this year - Hope that makes sense.

TYLM Growth Value = DIVIDE(([TYTM Value]-[LYTM Value]),[LYTM Value],0)

 

What I want the LYTM function to do, is go up until the date of the TYTM function.

 


Viewing all articles
Browse latest Browse all 213819

Trending Articles



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