Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
The message you are trying to access is permanently deleted.
Hi,
I have a question about a date calculation.
I have a report that needs to calculate the values of fixed assets.
The reports need to display the selected year for certain columns and for other columns the totals unit the selected year.
See example below
The columns Additions, Depreciation and Disposal display the values from the selected year.
But the column Acquisitions prior years needs to display the value of the Aqcuisition prior to the selected year.
In the example I selected 2022 and need to know the Acquisition value until 2021
I created a measure but it still respond to the date slices.
I also tried a measure to disgard the date slicer but it will give me all the values, not until 2021
Solved! Go to Solution.
Hi @BHarm65 ,
I made simple samples and you can check the results below:
You just need to add conditions to the fiter according to your needs.
Measure = var _select= SELECTEDVALUE(DimDate[Year])
return SUMX(FILTER('Table',[Date].[Year]<_select),[Value])
An attachment for your reference. Hope it helps!
Best regards,
Community Support Team_ Scott Chang
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi @BHarm65 ,
I made simple samples and you can check the results below:
You just need to add conditions to the fiter according to your needs.
Measure = var _select= SELECTEDVALUE(DimDate[Year])
return SUMX(FILTER('Table',[Date].[Year]<_select),[Value])
An attachment for your reference. Hope it helps!
Best regards,
Community Support Team_ Scott Chang
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
@BHarm65
Use the following measrue:
Acquisitions prio years =
VAR __SelectedYear = MAX( 'Calendar'[Year] )
RETURN
CALCULATE (
SUM ( faLedgerEntry[amount] ),
faLedgerEntry[faPostingType] = "Acquisition Cost",
'Calendar'[Year] < __SelectedYear
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
So extra information.
I tried the DAX function SAMEPERIODLASTYEAR but this only will give me the previous year and not all the years before the selected year.
I need to calculate the value from 2018 unit the selected year.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.