- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Calculate SUM for single value from multi-select slicer
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:
That works fine and I'm also able to show the whole sum over all months when the user selects "Full" in the other slicer.
Here is the problem:
How do I achieve that it only shows March now?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@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)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@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)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@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!

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
05-11-2024 12:02 AM | |||
04-22-2024 10:02 PM | |||
11-23-2023 03:36 AM | |||
06-14-2024 10:04 AM | |||
04-17-2024 08:28 AM |
User | Count |
---|---|
24 | |
13 | |
11 | |
10 | |
9 |
User | Count |
---|---|
18 | |
14 | |
13 | |
12 | |
10 |