Hi, I am trying to calculate YTD by running sum.
The calculation is YTD efficiency = running_sum(sum([hours saved])) / running_sum([total team hours]) and it is supposed to add up efficiency of each month to get the latest YTD in current month,
total team hours = countd([team id]) * [team hour per team]
I need to calculate by month because the countd([team id]) would give different number for each month. If I am checking the grand total of the Efficiency formula, it would give a different answer, because the number of teams in all year long is different from the teams in one month, considering dissolved or new teams.
Therefore, I need to use running sum formula shown above to find out the YTD number. However, in some tables I only want to show the final YTD, instead of MONTH granularity.
For example, I want to show the YTD number of today, and the time range is 01/01 - 07/13 of 2025, but the required result has to be calculated in MONTH granularity, from my understanding. In this case, I only want to show the current YTD by Measured Names, however the table would show each month's value of each Measured Names. I see that I can hide columns before July, but that means I need to manually hide the new month with time passed.
Can anyone show me what could I do with the YTD? I need to 1)draw YTD line in monthly granularity 2) show the latest YTD of the year by Measured Names, in a table format.
Thank you!
It is difficult to work from just the description in the post - please post a representative workbook (even fake data) so we can see what you have done - if you are working with sensitive data we recommend https://community.tableau.com/s/anonymize-tableau-package-data -
Before you reply make sure the data has been extracted from any live D/B and the file is in a TWBX format