March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi Guys
Apologies this is probably a basic query however I am looking to get the SUM of a column that contains the SUM only for the current year while ignoring any filtering/ slicers. It would be great if the measure could dynamically look at the current year.
Please see what I have below - it works until the slicer is applied.
Thanks
JU Year End 2023 =
CALCULATE(
SUM('Current Day'[JU]),
FILTER(
ALL('Date Table'[Year]),
'Date Table'[Year] = "2023"
)
)
Solved! Go to Solution.
Hi,
if you add, remove filters for whichever table you need to remove them from, to the line before your new filter e.g:
JU Year End 2023 =
CALCULATE(
SUM('Current Day'[JU]),
REMOVEFILTERS('Current Day'),
FILTER(
ALL('Date Table'[Year]),
'Date Table'[Year] = "2023"
)
)
@DOLEARY85 just as I replied I figured it out 🤣 You syntax is correct, I just switched around the table to the date table I was using and that seemed to get it. Thanks for your help
JU Year End 2023 =
CALCULATE(
SUM('Current Day'[JU]),
REMOVEFILTERS('Date Table'),
'Date Table'[Year] = "2023"
)
Hi,
if you add, remove filters for whichever table you need to remove them from, to the line before your new filter e.g:
JU Year End 2023 =
CALCULATE(
SUM('Current Day'[JU]),
REMOVEFILTERS('Current Day'),
FILTER(
ALL('Date Table'[Year]),
'Date Table'[Year] = "2023"
)
)
Thanks for quick reply, correct that does remove filtering however it looks like
'Date Table'[Year] = "2023"
Is not being picked up and previous years are now coming in to the SUM() as a result - any ideas?
Are you able to share the PBIX file? i've only been able to create a limited test based on the fields available in the measure which seems to work.
Hi @DOLEARY85 I don't think I can as it is pretty confidential financial data. I will keep looking and can update this thread if I find a solution.
@DOLEARY85 just as I replied I figured it out 🤣 You syntax is correct, I just switched around the table to the date table I was using and that seemed to get it. Thanks for your help
JU Year End 2023 =
CALCULATE(
SUM('Current Day'[JU]),
REMOVEFILTERS('Date Table'),
'Date Table'[Year] = "2023"
)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
89 | |
84 | |
70 | |
51 |
User | Count |
---|---|
206 | |
143 | |
97 | |
79 | |
68 |