Forum Discussion
Anonymous
1 year agoNot applicable
Calculate Year to Year Difference without Time Series Data
Hi everyone, Apologies for reposting a similar issue. I've gone through several previous posts and solutions shared by others regarding this common problem, but unfortunately, I haven't been able...
- 1 year ago
Anonymous Try this:
UOM_Prior_Year 1 = VAR SelectedYear = SELECTEDVALUE(dim_time[year]) VAR PriorYear = SelectedYear - 1 VAR __Company = MAX( 'dim_company'[company_id] ) VAR __Dates = SELECTCOLUMNS( FILTER( ALL( 'dim_time' ), [period] = "FY" || dim_time[period] = "H1"), "Date", [date_key] ) VAR __Regions = SELECTCOLUMNS( FILTER( ALL( 'dim_region' ), dim_region[region_name] = "Global" ), "Region", [region_id] ) VAR __Table = FILTER( ALL( 'financial' ), [date_key] IN __Dates && [region_id] IN __Regions && [company_id] = __Company ) VAR __Result = SUMX( __Table, [UOM %] ) RETURN __Result
Greg_Deckler
Community Champion
1 year agoAnonymous Try this:
UOM_Prior_Year 1 =
VAR SelectedYear = SELECTEDVALUE(dim_time[year])
VAR PriorYear = SelectedYear - 1
VAR __Company = MAX( 'dim_company'[company_id] )
VAR __Dates = SELECTCOLUMNS( FILTER( ALL( 'dim_time' ), [period] = "FY" || dim_time[period] = "H1"), "Date", [date_key] )
VAR __Regions = SELECTCOLUMNS( FILTER( ALL( 'dim_region' ), dim_region[region_name] = "Global" ), "Region", [region_id] )
VAR __Table = FILTER( ALL( 'financial' ), [date_key] IN __Dates && [region_id] IN __Regions && [company_id] = __Company )
VAR __Result = SUMX( __Table, [UOM %] )
RETURN
__Result- Anonymous1 year agoNot applicable
Hi Greg_Deckler
Thank you for your prompt solution. I appreciate it a lot 😁