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

ytd and lytd without selecting a year

$
0
0

Hello

I got transacions for the year 2015 from Jan till Dec

and for the year 2016 from Jan till Jun

 

I want to create KPIs and the users don't want to select / filter out anything

what I mean is that I want to create a line chart showing a line for YTD amount for 2016 vs YTD amount for 2015

for 2016 I created the following expression:

YTD Revenues = var maxYear = max(Master_Calendar[max_Year]) return CALCULATE(sum(view_operations[Amount]),view_account_categorization[Fiscal_Category_DescE]="Budget",view_account_categorization[Fiscal_Chapter_DescE]="Revenues",FILTER(all(Master_Calendar),Master_Calendar[Year]=maxYear && Master_Calendar[Date] <= max(Master_Calendar[Date])))

 

for 2015 I created the following expression

LYTD Revenues = CALCULATE([YTD Revenues],PREVIOUSYEAR(Master_Calendar[Date]))

 

However I get the following results which is not logical 

Untitled.png

Please advise


Viewing all articles
Browse latest Browse all 213819

Trending Articles



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