Forum Discussion

Gianluigi's avatar
Gianluigi
Icon for Helper II rankHelper II
3 years ago

New measure

Hello
excuse the question. I would like to create a new measure. After giving the name after the = sign I write in DAX. I can't figure out how to wrap by creating automatic line numbering to write on multiple lines.

Thank you

9 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi, could you please give more information and paste your dax code. If we could get examples of how you would like the formula to work we can help you all the better. Thanks!

    • Gianluigi's avatar
      Gianluigi
      Icon for Helper II rankHelper II

      Hello
      my problem is not the syntax of dax but that I can not automatically number the lines of code.

      Example

      1 var1 =
      2 VAR _WorkStart =
      3 TIME( 8; 00, 0 )

  • Hello
    For example, this code
    1 var1 =
    2 VAR _WorkStart =
    3 TIME( 8; 00, 0 )
    I copied and pasted it. If I want to write it I type var1 = then I would like to wrap so that you number the second line ect. Ect. After writing var1 =

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Gianluigi ,

       

      I think 1 should be the name for first var, you need to add a space between it and VAR function.

      Your code should look like as below.

      Dax =
      VAR 1 = ...
      VAR _WorkStart = TIME(8,0,0)
      RETURN
      ...

      If this reply still couldn't help you solve your issue, please share a sample file with me.

       

      Best Regards,
      Rico Zhou

       

      If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

       

       

    • Gianluigi's avatar
      Gianluigi
      Icon for Helper II rankHelper II

      Hello
      my problem is not the syntax of dax but that I can not automatically number the lines of code.

      Example

      DAX =

      1 ....
      2 .....
      3 .....

       

      thank you

      • mussaenda's avatar
        mussaenda
        Icon for Community Champion rankCommunity Champion

        Hi Gianluigi ,

         

        I dont understand, 

        There are line numbers in dax already

         

         

  • Hello
    I found the solution. I probably didn't explain myself.

    With shift + Enter you wrap and the lines are numbered