Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

How to add multiple variables (adapt '&' to return a value)

Good Morning,   I was hoping someone could help me out- I apologise if this is already common knowledge- I could not find it within the forum.   Essentially I need to add multiple variables- howe...
  • v-jingzhang's avatar
    5 years ago

    Hi Anonymous 

     

    You only need to use one '&' to combine multiple values. For example,

    (Wk1-Wk4) & (Wk2-Wk1) & (Wk3-Wk2)

     

    Or if you want to add a delimiter (e.g. comma) between values, you could use

    (Wk1-Wk4) & "," & (Wk2-Wk1) & "," & (Wk3-Wk2)

     

    '&' is a text concatenation operator while '&&' is a logic operator.

    DAX syntax - DAX | Microsoft Docs

     

    Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as the solution to help other members find it.