cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Address Block

I have a need to present on a screen an address block. 

 

Needed format

 

CustName

CustAddress1

CustAddress2

CustCity, CustSt CustZip

 

Any guidance is appreciated. 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User I
Super User I

Re: Address Block

Hi @bmarcowka 

 

You could use the expression below to create a column in your table:

Address Block = 
VAR Name = Table1[CustName]
VAR Add1 = Table1[CustAddress1]
VAR Add2 = Table1[CustAddress2]
VAR City = Table1[CustCity]
VAR Zip = Table[CustZip]
VAR Result = 
Name & UNICHAR(10) & Add1 UNICHAR(10) & Add2 UNICHAR(10) & City & ", " & Zip
RETURN Result

 

If you need it as a measure, use this instead:

Address Block = 
VAR Name = SELECTEDVALUE( Table1[CustName] )
VAR Add1 = SELECTEDVALUE( Table1[CustAddress1] )
VAR Add2 = SELECTEDVALUE( Table1[CustAddress2] )
VAR City = SELECTEDVALUE( Table1[CustCity] )
VAR Zip = SELECTEDVALUE( Table[CustZip] )
VAR Result = 
Name & UNICHAR(10) & Add1 UNICHAR(10) & Add2 UNICHAR(10) & City & ", " & Zip
RETURN Result

 

Best regards,
Martyn


If I answered your question, please help others by accepting it as a solution.





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

Proud to be a Super User!




View solution in original post

5 REPLIES 5
Highlighted
Super User I
Super User I

Re: Address Block

Hi @bmarcowka 

 

You could use the expression below to create a column in your table:

Address Block = 
VAR Name = Table1[CustName]
VAR Add1 = Table1[CustAddress1]
VAR Add2 = Table1[CustAddress2]
VAR City = Table1[CustCity]
VAR Zip = Table[CustZip]
VAR Result = 
Name & UNICHAR(10) & Add1 UNICHAR(10) & Add2 UNICHAR(10) & City & ", " & Zip
RETURN Result

 

If you need it as a measure, use this instead:

Address Block = 
VAR Name = SELECTEDVALUE( Table1[CustName] )
VAR Add1 = SELECTEDVALUE( Table1[CustAddress1] )
VAR Add2 = SELECTEDVALUE( Table1[CustAddress2] )
VAR City = SELECTEDVALUE( Table1[CustCity] )
VAR Zip = SELECTEDVALUE( Table[CustZip] )
VAR Result = 
Name & UNICHAR(10) & Add1 UNICHAR(10) & Add2 UNICHAR(10) & City & ", " & Zip
RETURN Result

 

Best regards,
Martyn


If I answered your question, please help others by accepting it as a solution.





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

Proud to be a Super User!




View solution in original post

Highlighted
Frequent Visitor

Re: Address Block

Thank you @MartynRamsden. Getting message The sysntax for UNICHAR is incorrect.  

 
Address Block =
VAR CustName = OrgStops[CustName]
VAR Add1 = OrgStops[CustAddress]
VAR City = OrgStops[CustCity]
VAR State = OrgStops[CustState]VAR Zip = OrgStops[CustZip]
VAR Result =
CustName & UNICHAR(10) & Add1 UNICHAR(10) & City & ", " & Zip
RETURN Result
 
 
Super User I
Super User I

Re: Address Block

Hi @bmarcowka

You're missing an ampersand '&' between Add1 and UNICHAR(10)

Best regards,
Martyn




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

Proud to be a Super User!




Highlighted
Super User I
Super User I

Re: Address Block

Sorry @bmarcowka

Just realised it was missing from my original example. Apologies!




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

Proud to be a Super User!




Highlighted
Frequent Visitor

Re: Address Block

Worked perfectly.  Now to get it to be left justified.  

 

Thanks again @MartynRamsden 

Helpful resources

Announcements
Ignite

Microsoft Ignite

This will be a conference that you do not want to miss!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Don't miss the Power BI Dev Camp this week!

August Community Highlights

Check out a full recap of the month!

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.