Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
finno14
Helper I
Helper I

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- however as '&' brings back True/False the variable does not produce a value-- I know the variable works as individually they return the value--

 

Below are the variables- and in an ideal world- is what id want the formula to do-- 

 

 

finno14_0-1622098532232.png

*Please note I do not have access to the data tab, nor typical calenders functions are not viable*

 

Any guidance would be great!!


Kind regards,

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @finno14 

 

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.

View solution in original post

3 REPLIES 3
v-jingzhang
Community Support
Community Support

Hi @finno14 

 

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.

Tahreem24
Super User
Super User

@finno14  What do you want to display in an output?

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
amitchandak
Super User
Super User

@finno14 , expected output is not clear to me

If you want to multiple you can create like 

 

(Wk1 -wk2) *(W3-w4)

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.