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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
GQ
Helper I
Helper I

Concatenation using variables

I need to have a result column in my report be a concatenation of text and conditionally, 1 or 2 addtional text 'values'.

"Donor+xxxx" - in every row
conditionally, if donor # from table 1 matches a donor # from table 2, I need to concatenate "+yyy"
Further, if the State in another table = a certain value, additional concatenate "+zzz'

Both the yyy & zzz are optional

End results could be any of:
Donor+xxxx
Donor+xxxx+yyy
Donor+xxxx+zzz
Donor+xxxx+yyy+zzz

yyy and zzz are not present in any table, just text values to concatenate.

 

I've been playing with using variables and concatenations and Related, but no success.

2 REPLIES 2
Arul
Super User
Super User

@GQ ,

Can you share the sample data?

 

Thanks,





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


I'm not certain the best way to share data information.  Will the relationship diagram help? 

 

Here is what I've tried to start - I'm trying to create a measure on a donor transaction table checking to see if the donor number is in the CHG table.

 

TestReq =
 var CHG = RELATED(CHAGAS[TIDONR])
 RETURN

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.