Forum Discussion
YTD for calculated values not working
- 2 years ago
superjam Here you go:
Measure = VAR __MesAnoNUm = MAX('Calendar'[MesAñoNum]) VAR __Table = FILTER ( SUMMARIZE( ALLSELECTED('Calendar'), [MesAño], [MesAñoNum], "__Value", [Revenue month] ), [MesAñoNum] <= __MesAnoNum ) VAR __Result = SUMX( __Table, [__Value] ) RETURN __Result
Hello Greg_Deckler
You rock!! It worked fine. THANK YOU very much.
Now it is my turn to discover and learn how you did it (and why otherwise it did not work).
And I think I will by your book. Really.
Kind regards.
superjam Thanks. It's interesting because at it's heart, it's a running total. And you have a Calendar table so, in theory, you should have been able to construct that running total using CALULATE and/or using time intelligence functions so not entirely certain where things were going haywire other than it's likely some complexity buried in your measures that eventually become part of the running total. A lot of running totals are simple SUM's but yours is much more complex so that would be my guess as far as what was going on.