locked
Even function in DAX RRS feed

  • Question

  • I have found that this function exists in DAX. See the link:

    https://msdn.microsoft.com/en-us/library/mt171495.aspx

    but in my PowerPivot (Excel 365) it couldn' t be found. It seems to doesn't exist in this Excel version or what?

    What I need is a Calculated column formula for Spread to get results (based on Page column):

    Page        Spread


    1                 2

    2                 2

    3                 4

    4                 4

    Thursday, January 14, 2016 10:59 AM

Answers

  • Hi Bartek

    I was not able to get the EVEN function to work in power pivot, but the function was available in PowerBI.

    However it would be possible to write a calculation that returned the same result.

    =[page]+mod([page],2)

    This function simply adds on to all odd numbers


    Hope this helps

    Thursday, January 14, 2016 11:39 AM

All replies

  • Hi Bartek

    I was not able to get the EVEN function to work in power pivot, but the function was available in PowerBI.

    However it would be possible to write a calculation that returned the same result.

    =[page]+mod([page],2)

    This function simply adds on to all odd numbers


    Hope this helps

    Thursday, January 14, 2016 11:39 AM
  • You can also use the MROUND function, which rounds up to a given multiple (2, in this case):

    = MROUND([Page],2)

    Thursday, January 14, 2016 11:53 AM
    Answerer
  • Hi Bartek,

    According to your description, you are experiencing the issue that cannot use EVEN function in PowerPivot data model, right?

    I have tested it on my local environment, we can reproduce this issue. It seems that this function is not enable on PowerPivot data model. In order to workaround this issue, you can use the DAX expression
    =[page]+mod([page],2)
    as MichaelAdrianJohnson said.

    Besides, you can submit a feedback at http://connect.microsoft.com/SQLServer/Feedback and hope it is resolved in the next release of service pack or product. Your feedback enables Microsoft to make software and services the best that they can be, Microsoft might consider to add this feature in the following release after official confirmation.

    Regards,


    Charlie Liao
    TechNet Community Support

    Friday, January 15, 2016 7:14 AM
  • Thanks Guys

    I have a long list of things that could be improved especially in PP.

    Good to know the link to submit a feedback

    Bartek

    Friday, January 15, 2016 11:29 AM