Forum Discussion

finsmaniac1551's avatar
finsmaniac1551
New Member
2 years ago
Solved

Help with TOTALYTD Formula

Hi everyone, I am having trouble with the TotalYTD Formula, below is by data set, it is in order from latest month at top and most recent at bottom .The column that is not correct is the far right one, it is supposed to be a summation of the Unused $ (highlighted in blue), you can see it is slightly off. The 'CommitBillable$YTD' column, two from the right, uses the same DAX TOTALYTD formula and is calculating correctly, it is based off the far left column (highlighted in yellow). 

 

 

This is the working measure, (ignore red line errors, I changed the names). The expression being calculated, 'X'[CommitBillable$', is in my data set.

 

This is the measure that is not working. The expression being calculate, 'Unused $' is a measure, which I assume is where my issue is. The measure on it works properly on it's own. But within this new YTD measure it does not seem to work.

 

Any ideas on what to try?

 

Thanks.

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi finsmaniac1551 ,

    Regarding your question, please make sure that the table data is similar to the following data.

    The formula works well.

    Or you can leave out the 'TotalYTD' function for the same purpose.

    Measure 2 = 
    CALCULATE(SUM('Table'[Value]),
    FILTER(ALL('Table'[Month]),
    AND(
        YEAR('Table'[Month]) = YEAR(MAX('Table'[Month])),
        'Table'[Month] <= MAX('Table'[Month])
       )
    ))

    If in doubt, please share the .pbix file without sensitive data.

     

    Best Regards,
    Wenbin Zhou
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi finsmaniac1551 ,

    Regarding your question, please make sure that the table data is similar to the following data.

    The formula works well.

    Or you can leave out the 'TotalYTD' function for the same purpose.

    Measure 2 = 
    CALCULATE(SUM('Table'[Value]),
    FILTER(ALL('Table'[Month]),
    AND(
        YEAR('Table'[Month]) = YEAR(MAX('Table'[Month])),
        'Table'[Month] <= MAX('Table'[Month])
       )
    ))

    If in doubt, please share the .pbix file without sensitive data.

     

    Best Regards,
    Wenbin Zhou
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.