Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Date formatting issue

Hi community! Have an issue to ask you help with. By the code below I'm trying to get value for the last available day in the previouse year (as you see the hardcoded part - it's Dec 28).  LastYea...
  • v-lid-msft's avatar
    7 years ago

    Hi Anonymous ,

     

    Because embed measure into a measure may occur some error regardless of date format, you can try to calculate the date into a var before using it to filter like following.

     

    LastYear Bill FTE = 
    VAR d = [BilledFTE]
    RETURN
        CALCULATE (
            SUM ( Billed_FTE[Client] ),
            FILTER ( ALLEXCEPT ( Billed_FTE, Billed_FTE[Client] ), Billed_FTE[Date] = d )
        )

     

    BTW, pbix as attached.

     

    Best regards,

     

    Community Support Team _ DongLi
    If this post helps, then please consider Accept it as the solution to help the other members find it more