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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I'm new to DAX and struggling with a formula, I am trying to replicate the following excel formula in PowerBi.
In my scenario I have, sales value(F Net value CR), year(2019-2020, 2020-2021, 2021-2022)
i want calculate total sales by year(display year)
Solved! Go to Solution.
@Anonymous , Try like
total sales = calculate(sum(Sales[N F Net Value Cr]),filter(allselected(Master_Calendar),Master_Calendar[Display Year] = max(Master_Calendar[Display Year]) ))
@Anonymous , New measure
sumx(filter(allselected(Table), Table[Display Year] = max(Table[Display Year]) ), Table[F Net value CR])
add other, if need like channel
sumx(filter(allselected(Table), Table[Display Year] = max(Table[Display Year]) && Table[channel] = max(Table[channel]) ), Table[F Net value CR])
if you need column
sumx(filter((Table), Table[Display Year] = earlier(Table[Display Year]) ), Table[F Net value CR])
actuall i have two tables sales and calender, sales data fetching from S4HANA
i tried your messure but below error is showing.
@Anonymous , Try like
total sales = calculate(sum(Sales[N F Net Value Cr]),filter(allselected(Master_Calendar),Master_Calendar[Display Year] = max(Master_Calendar[Display Year]) ))
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.