Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Trying to sum full year but getting error message

I have the years selected on a slicer and it am trying to sum full year budget using

 

full year = CALCULATE(SUM(Budgets[amount]),'Calendar$'[Date].[Year])

but I am receiving this error message.

 

An unexpected error occurred (file 'xlname.cpp', line 388, function 'XLNamePair::NormSubtree').An unexpected error occurred (file 'xlname.cpp', line 388, function 'XLNamePair::NormSubtree').

 

Help

 

Thanks

 

 

2 ACCEPTED SOLUTIONS
Sean
Community Champion
Community Champion

Full Year 2016 =
    CALCULATE (
        SUM ( Budgets[Amount] ),
        FILTER ( ALL ( 'Calendar$' ), 'Calendar$'[Date].[Year] = 2016 )
    )

So if your Slicer is from the Calendar table use the above!

If not this should work either way...

 

Full Year 2016 ALT =
    CALCULATE (
        SUM ( Budgets[Amount] ),
        FILTER ( ALL ( 'Budgets' ), 'Budgets'[budget_code] = 2016 )
    )

 

View solution in original post

Hi @Anonymous,



Thanks Jerry, i can see that working but the problem is we have transactions in there for next year. 

Would MAX still bring in 2016? or 2017?


What columns are you using for the "Year" Slicer and "Month" Slicer? If the columns used for the Slicers are all from your "Calendar$" table(and you should use date column of the"Calendar$" table for both your Slicers in this scenario), then the formula I provided above will sum the full year depends on your selection of the "Year" Slicer. For example, if you select "2016" for "Year" Slicer, then the MAX will bring in 2016, and the measure will sum full year of 2016.Smiley Happy

 

Regards

View solution in original post

11 REPLIES 11

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.