DAX Calculated Relationship

十年热恋 提交于 2019-12-12 04:17:52

问题


  • Month, MyMeasure
  • Nov-15, 150
  • Dec-15, 150
  • Jan-16, 200
  • Feb-16, 200 -- projections into the future not desired
  • Mar-16, 200 -- projections into the future not desired
  • Apr-16, 200 -- projections into the future not desired

I have a measure which uses an ALL function to remove the relationship to the date table and calculate a distinctcount in a modified context. Which is great but now the measure extends into the future until the end of the date table.

I need to apply another filter after the first calculation:

If calendar[date] < today() then MyMeasure ELSE blank

or maybe something using LOOKUPVALUE?


回答1:


CALCULATE(
    [<measure>]
    ,FILTER(
        ALL( 'DimDate' )
        ,'DimDate'[Date] <= TODAY()
    )
)


来源:https://stackoverflow.com/questions/34669274/dax-calculated-relationship

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