Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

DAX Measure error

Hi Experts 

 

Cannot see how to fix the following DAX....

Measure 3 = 
VAR _User =
   CONCATENATE(
        CONCATENATE(
        "(",
        CONCATENATE(
            "India",
            ")")
    ),
    CONCATENATE(
        "[",
        CONCATENATE(
            004,
            "]")
    ))
RETURN

_User

 

 

Error message

 

  • just put the ; after the closing bracket around India:

     

    Measure 3 =
    VAR _User =
       CONCATENATE(
            CONCATENATE(
            "(",
            CONCATENATE(
                "India",
                ");")
        ),
        CONCATENATE(
            "[",
            CONCATENATE(
                004,
                "]")
        ))
    RETURN

    _User

5 Replies

  • DOLEARY85's avatar
    DOLEARY85
    Resident Rockstar

    Hi,

     

    there doesn't seem to be anything wrong, i copied it into PBI and it works:

     

     

    If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Doleray85 how do i amend the above to include a ; between (india) and [4] so end result is (india);[4]

      • DOLEARY85's avatar
        DOLEARY85
        Resident Rockstar

        just put the ; after the closing bracket around India:

         

        Measure 3 =
        VAR _User =
           CONCATENATE(
                CONCATENATE(
                "(",
                CONCATENATE(
                    "India",
                    ");")
            ),
            CONCATENATE(
                "[",
                CONCATENATE(
                    004,
                    "]")
            ))
        RETURN

        _User
  • May I ask :
    1. why do you use so many CONCATINATE? Should not && do the job?
    2. is (India)(0040) - this what the VAR should return? Am I right?

  • Hello Anonymous,

     

    you can do it like this 

    measure = "(India)(0040)"

    If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

    Follow me on Linkedin