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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
jnguyen21
Helper I
Helper I

Matrix Total is Not Correct - Specific Date

I'm putting together data that shows actuals up to a given month, and the rest of the year budget. The issue I am having is the total is not adding up correctly for the Budget ROY Column. The logic is if a specific month is selected, that month and the remainder of the year will populate budget. The beginning of the year will be zero. While the grid rows are correct, the total row is not. It is showing the same total for both the Budget and Budget ROY column

 

Can you let me know what my issue is?

 

Budget ROY =
var first_day = min('Calendar'[FirstDayofYear])   
var last_day = max('Calendar'[LastDayOfPeriod])  
return  
IF(SELECTEDVALUE('Calendar'[LastDayOfPeriod])  )>= first_day && SELECTEDVALUE('Calendar'[LastDayOfPeriod])  <=last_day,[Budget],0)

 

jnguyen21_2-1632863809312.png

 

 

 

1 ACCEPTED SOLUTION
jnguyen21
Helper I
Helper I

I was able to find my issue by referencing the below video

 

https://www.youtube.com/watch?v=Rii_6qkLNh8

View solution in original post

3 REPLIES 3
jnguyen21
Helper I
Helper I

I was able to find my issue by referencing the below video

 

https://www.youtube.com/watch?v=Rii_6qkLNh8

jnguyen21
Helper I
Helper I

Thank you for responding, but that doesn't look like that worked either. It is doing the same thing as totaling up the budget column. It looks like the zero that's being put in does not remove the volume from the measure, just hides it. 

amitchandak
Super User
Super User

@jnguyen21 , Based on the row/group by of you visual, change like

 

Budget ROY =
var first_day = min('Calendar'[FirstDayofYear])
var last_day = max('Calendar'[LastDayOfPeriod])
return
Sumx(values('Calendar'[Fiscal Period]) , IF(SELECTEDVALUE('Calendar'[LastDayOfPeriod]) )>= first_day && SELECTEDVALUE('Calendar'[LastDayOfPeriod]) <=last_day,[Budget],0) )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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