Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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!
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |