Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Per Customer YTD Totals in Matrix Incorrect

Hi All,

 

I am having an issue with my YTD measure excluding specific customers from my matrix.

 

The subtotals for each month are correct, however when I expand it to look at YTD values per customer I find that some customers are missing if they have zero activity for that specific month. For example, customer Seven Corners had activity of $14,000 in 8-2022. However, this amount is not included in 2022-09, 2022-10, or 2022-11 when the matrix is expanded (I assume due to row context).

 

The measure I am using to calculate the YTD values is: 

Year-to-Date Margin = TOTALYTD(SUM('MH History Detail'[Margin $]), 'MH History Detail'[Month Ref])

 

Is there a way to rewrite my DAX formula so that customers such as Seven Corners will have their YTD values included even in months where they have no specific activity? In other words, so that Seven Corners will have a value of $14,000 in month refs 2022-09, 2022-10, and 2022-11?

 

Thank you in advance!

4 Replies

  • Jayee's avatar
    Jayee
    Icon for Responsive Resident rankResponsive Resident

    Hi Anonymous 

     

    Please check this link SQL BI has provided a good article how to calculate Year to date with weeks you can replace weeks with customers it will solve you requirement.

     

    If this post helps, then please consider Accept it as the solution, Appreciate your Kudos!!

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Jayee,

       

      I appreciate you taking the time to respond to my inquiry. However, this did not solve my issue. I read the article and made the suggested change yet did not notice a difference.

      • Jayee's avatar
        Jayee
        Icon for Responsive Resident rankResponsive Resident

        May be you can provide sample data without sensitive information so that I can able to help you further.