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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello,
I´m trying to build a metric which calculates sameperiodlastyear. I cant use the function because i have noncontiguos dates in my fact table. I got this to work out:
Fat Ano Ant:=CALCULATE (
[Faturamento],
FILTER ( ALL ( 'Calendar' ), 'Calendar'[Year] = YEAR ( TODAY () ) - 1 )
)
It works if the field is collapsed. But when I try to expande the filter to months it gives only the result for the year:
How can aggregate by months?
Thanks in advance
Solved! Go to Solution.
Hi @Fcoatis,
Try something like this
Fat Ano Ant:=CALCULATE ( [Faturamento], DATEADD(Calendar[Date],-1,YEAR) )
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Fcoatis,
Try something like this
Fat Ano Ant:=CALCULATE ( [Faturamento], DATEADD(Calendar[Date],-1,YEAR) )
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsThat simple???
Thank you very much