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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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