Forum Discussion
Anonymous
1 year agoNot applicable
TOTALMTD using previous months total because data is not available for current month
Hello everyone! I am using TOTALMTD in a SWITCH to calculate TOTALPAID MTD with a Slicer for All Vendors and individual vendors. This seems to work accurately with the exception of 1 specific ven...
- 1 year ago
Hi Anonymous
When using time-smart functions, creating a corresponding calendar table is a better option.
But in your case, you can also just try the following measure:
Period Paid = SWITCH([Selected Period], 1, TOTALMTD([Paid], DATESMTD(ALL('Table'[Date Column]))), 2, TOTALQTD([Paid], DATESQTD(ALL('Table'[Date Column]))), 3, TOTALYTD([Paid], DATESYTD(ALL('Table'[Date Column]))), 4, TOTALYTD([Paid], PREVIOUSYEAR(DATESYTD(ALL('Table'[DateColumn])))), 5, [Paid] )Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !
Thank you~
- Anonymous1 year ago
Thank you! I do have a corresponding Date calendar and I apologize for not including that information in the original post. However, I have updated the "Paid" measure with "DATESYTD(ALL... " as you stated in your post and this seems to have worked! The only thing is that it is displaying "BLANK" and I need it to display "0".. any suggestions? I have not yet tried anything but thought I would ask anyways 🙂