PowerPivot YTD with Missing Data

依然范特西╮ 提交于 2021-01-28 05:30:39

问题


Problem with computation of YTD if Data on a particular period is not existing

Using formula

YTDUnits =CALCULATE(SUM(Data[TYUnits]),DATESYTD(Data[FullDate]),ALL(Data[Month])))

Data came from a csv file, and am only using 1 table in the data model.

In this example, Month 2 should have a value of 6 on TransactionType c. Is there a way to fill this?

In the data model, no record exists for TransactionType c Month 2


回答1:


I manually typed in your data sample, and built the data model:

Put Year-Month from the calendar table on the pivot, and added this DAX measure:

YTDUnits = CALCULATE(SUM(Data[TYUnits]), DATESYTD('Calendar'[Date]))

Result:



来源:https://stackoverflow.com/questions/61187301/powerpivot-ytd-with-missing-data

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!