Forum Discussion

amitnarkar3's avatar
amitnarkar3
Helper I
9 years ago
Solved

TOTALYTD with DirectQuery

Hi All,

 

Could you suggest an aquivalent for TOTALYTD() function in DirectQuery mode?

This should work with Date Slicer selection.

 

Thanks,

Amit

  • amitnarkar3

     

    You can try to click "File"->"Options and settings"->"Options"->"DirectQuery"->check "allow unstricted measures" to enable TOTALYTD.

     

    Do mind the that using the unstricted measures would affect performance in DirectQuery mode.

6 Replies

  • Eric_Zhang's avatar
    Eric_Zhang
    Microsoft Employee

    amitnarkar3

     

    You can try to click "File"->"Options and settings"->"Options"->"DirectQuery"->check "allow unstricted measures" to enable TOTALYTD.

     

    Do mind the that using the unstricted measures would affect performance in DirectQuery mode.

      • amitnarkar3's avatar
        amitnarkar3
        Helper I

        Eric_Zhang

         

        I need to publish this on Azure portal, will it still work. Do I need to also enable this option anywhere else?

  • CALCULATE (
        SUM ( Table[Column] ),
        FILTER (
            ALL ( Calendar ),
            'Calendar'[Date] <= MAX ( 'Calendar'[Date] )
                && YEAR ( 'Calendar'[Date] ) = YEAR ( MAX ( 'Calendar'[Date] ) )
        )
    )
    • amitnarkar3's avatar
      amitnarkar3
      Helper I

      this also works only when I enable unrestricted option in power bi desktop. will it still work on power bi portal or azure portal?

      Do we need to enable same thing in that case and from where I can do it?