Forum Discussion

teresadanna's avatar
teresadanna
Frequent Visitor
8 years ago
Solved

TOTALMTD() now showing nulls or missing

I'm looking to include people who don't have hours for the prior month as blank or 0. Currently the measure looks like:

 

MTD Hrs = TOTALMTD(sum(Table[Hours]),[Date])

 

Data Example if today is 11/14:

 

Employee IDMonthHours
432January4
432September3
432October2
567January8
567September9
987February10
987March11
987April12

 

The list then shows:

 

Employee IDHours
4322

 

However I'd like it to show:

 

Employee ID 
4322
567 
987 

 

Its ok if 567 and 987 show 0s instead if blank, either works

  • teresadanna's avatar
    teresadanna
    8 years ago

    Looks like this issue is the result of a bigger issue due to not having a single date table. Thanks all for your assistance though!

3 Replies

  • Hi,

     

    Try this

     

    =IF(ISBLANK(TOTALMTD(sum(Table[Hours]),[Date])),0,TOTALMTD(sum(Table[Hours]),[Date]))

     

    Hope this helps.

  • v-ljerr-msft's avatar
    v-ljerr-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi teresadanna,

     

    In addition, you should also be able to simply add "+ 0" to your formula to get the expected result. :smileyhappy:

    MTD Hrs = TOTALMTD ( SUM ( Table[Hours] ), [Date] ) + 0
    

    Regards

    • teresadanna's avatar
      teresadanna
      Frequent Visitor

      Looks like this issue is the result of a bigger issue due to not having a single date table. Thanks all for your assistance though!