Forum Discussion

PB797's avatar
PB797
New Member
4 years ago

Why is my Table Total row blank??

 

 

4 Replies

  • mahoneypat's avatar
    mahoneypat
    Icon for Microsoft Employee rankMicrosoft Employee

    Can you share the measure you are using? I suspect there is a function (e.g., SELECTEDVALUE) or logic that is return blank in the "total" row. Please @ mention me in the response so I see your reply.

    Pat

     

    • PB797's avatar
      PB797
      New Member

      mahoneypat 

      Adjustments_Month_to_Date = CALCULATE(SUM(Query1[ActivityAmount]),DATESMTD('Calendar'[Date]))
      • mahoneypat's avatar
        mahoneypat
        Icon for Microsoft Employee rankMicrosoft Employee

        In the "total" row, there is no filter on date, so it is seeing the entire Calendar table and the DATESMTD function is returning the dates in the last month of the year. As that hasn't happened yet, you likely don't have any matching rows in your table, so it appears as a blank.

         

        Have you tried a simpler DAX expression? The DATESMTD may not be necessary. Perhaps just

        SUM(Query1[ActivityAmount])

        You would likely see the expected total. If you do need the DATESMTD, you can get the expected total with an expression like this as described in this video - Power BI - Tales from the front #01 - Getting the Right Total - YouTube

         

        New SUM MTD =
        SUMX (
        VALUES ( 'Calendar'[Month] ),
        CALCULATE ( SUM ( Query1[ActivityAmount] ), DATESMTD ( 'Calendar'[Date] ) )
        )

         

        Pat