Forum Discussion
rampie
9 months agoKudo Commander
UDF With Time Int or Relationship functions
Has anyone try combining UDF with Time Intelligence or Relationship functions the results of these UDF it's the same value than the original measure, i don't see any limitations in the UDF documentation
For Example:
UDF_Calcultate_LY_StoreCart = (
MeasureName : decimal
) => CALCULATE( MeasureName, USERELATIONSHIP( Dim_Date[LYDate], Dbo_StoreCart[OrderDate] ))
or
UDF_Calcultate_YTD = (
MeasureName : decimal
) => TOTALYTD( MeasureName, Dim_Date[Date] )
rampie it should be something like this:
UDF_Calcultate_LY_StoreCart = ( MeasureName : EXPR ) => CALCULATE( MeasureName, USERELATIONSHIP( Dim_Date[LYDate], Dbo_StoreCart[OrderDate] ))