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

YTD Troubles

$
0
0

Hello.

I'm having a complete time dimension that works fine with the regular YTD, MTD .....

But I've created a 2nd date field that holds for every date the date of yesterday in that year.

Some example

10/06/2016   Holds 10/05/2016

10/03/2016   Holds 10/05/2016

10/06/2014   Holds 10/05/2014

Even if the user makes no date selections I can compare a 'honest' YTD over the years to see progress over the years.

When I look in the data this field is correct.

But as soon as I used a TOTALYTD on that field it doesn't work.

Here are my formulas ...

Year_Today = DATE(YEAR(TODAY()-1)-IF('Dim_Dates'[Dat_Date]>TODAY()-1;BLANK();DATEDIFF('Dim_Dates'[Dat_Date];TODAY()-1;YEAR));MONTH(TODAY()-1);DAY(TODAY()-1))

YToday Visitors All = TOTALYTD(SUM('Fact_Sessions'[Sess_Visitors_All]); 'Dim_Dates'[Dat_Date])  (Working)

YTDToday Visitors All = TOTALYTD(SUM('Fact_Sessions'[Sess_Visitors_All]); 'Dim_Dates'[Year_Today])   (Funny)

 

And these are the resultsCapture.PNG

 

I supose i'm abusing the idea of YTD but have no idea why ....


Viewing all articles
Browse latest Browse all 216485

Trending Articles



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