Forum Discussion

jnguyen21's avatar
jnguyen21
Icon for Helper I rankHelper I
4 years ago
Solved

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)

 

 

 

 

3 Replies

  • 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) )

  • 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.