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.
Hey guys,
hope you can help me out with this one.
I have a filter on month names (for simplicity let's imply the year is always 2022):
And another slicer that allows period selection (MTD/Full). I'm already calculating the sum over the selected period.
Now, what I want to achieve is, that it is only calculating the sum and displaying it in a bar chart for the most recent month selected (e.g. March) when the user has MTD selected.
I did the calculation like that:
Solved! Go to Solution.
@Anonymous , Create a measure
measure =
var _max = eomonth(maxx(allselected(Dates) , Dates[Date]) ,0)
return
calculate(sum(Table[Value]), filter(Dates, eomonth(Dates[Date],0) =_max)
@Anonymous , Create a measure
measure =
var _max = eomonth(maxx(allselected(Dates) , Dates[Date]) ,0)
return
calculate(sum(Table[Value]), filter(Dates, eomonth(Dates[Date],0) =_max)
@amitchandak
Thanks for your reply. Solved my issue with the MTD calculation. But I'm not able to transfer your example to a YTD calculation. If a user selects YTD, I want to show all months of the most recent year in a bar chart, despite the fact that the user might have not selected all months. How do I deal with this?
Appreciate your help!