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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Year to Date totals not appearing when Filtering using All Function

Hello,

I have a field that calculates fine at the row level within a table but doesn't not display at the total level (please see image below).  Any recommendations on how I should modify it so the total will display correctly?

 

Thanks for any help

 

  • Measure is called YTD DF and uses Sales results from a Table called 'Actuals' (measure calculation shown below)
  • The objective of the measure is to calculate the sum total sales year to date
  • Filters reference 3 other tables: CalendarTable to select the month you want to see YTD data up to, and two product group dimension tables called Channels and Brands

 

YTD DF =
CALCULATE([Sales],
     FILTER(ALL(Actuals),
          Actuals[Month Number] <= SELECTEDVALUE(CalendarTable[Month Number]) &&
          Actuals[Year Num] = YEAR(TODAY()) &&
          Actuals[Channel] = SELECTEDVALUE(Channels[Channels]) &&
          Actuals[ReportingBrand] = SELECTEDVALUE(Brand[Brand])))

 

Picture1.png

1 ACCEPTED SOLUTION
dedelman_clng
Community Champion
Community Champion

Make sure CalendarTable is the "parent" of your sales table (you may have to create a full date column on the sales table instead of just having month number & year number)

 

Then you can create a measure using TOTALYTD, and the nature of slicers is such that you do not have to reference them directly:

 

YTD DF = CALCULATE(TOTALYTD(Actuals[Sales]))


The selected values of Brand and Channel from the slicers will automatically filter down the measure.

 

 

Hope this helps,

David

View solution in original post

2 REPLIES 2
dedelman_clng
Community Champion
Community Champion

Make sure CalendarTable is the "parent" of your sales table (you may have to create a full date column on the sales table instead of just having month number & year number)

 

Then you can create a measure using TOTALYTD, and the nature of slicers is such that you do not have to reference them directly:

 

YTD DF = CALCULATE(TOTALYTD(Actuals[Sales]))


The selected values of Brand and Channel from the slicers will automatically filter down the measure.

 

 

Hope this helps,

David

Anonymous
Not applicable

Ah ha.  Brilliant.  When I was searching for how to calculate YTD online the solution I saw was this more complicated method.  Nice that there's a function in place.  Seems like there's lots of good Power BI adds occuring.

 

Thanks again

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors