Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello Everyone
I have this measure to get the stock for the selected year in filter
Selected Year = CALCULATE(SUM(GENERALJOURNALS[AMOUNT]),FILTER(GENERALJOURNALS,GENERALJOURNALS[MAINACCOUNT] = 5637144608))
Solved! Go to Solution.
Hi @Wadda7AboUdai ,
Create a calendar table and relate it to your fact table on Calendar[Date] ONE : MANY Fact[Date], then use the following measure:
_PriorYear =
CALCULATE(
[Selected Year],
SAMEPERIODLASTYEAR(Calendar[Date])
)
Pete
Proud to be a Datanaut!
Hi @Wadda7AboUdai ,
Create a calendar table and relate it to your fact table on Calendar[Date] ONE : MANY Fact[Date], then use the following measure:
_PriorYear =
CALCULATE(
[Selected Year],
SAMEPERIODLASTYEAR(Calendar[Date])
)
Pete
Proud to be a Datanaut!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.