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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
ShivGC
Helper I
Helper I

Simple Custom Data Label

HI,

I want to create a custom data label with Dax, where it refers to multiple different things.

For instance, I have an unrelated table 1 and table 2. 

In Table 1, there is one column with client names.

Client 

Client 1 
Client 2
Client 3


In Table 2, there are multiple columns but we only want to refer to the client identifier.

Client NameIdentifierValue
Client 1 Client 1 UK

10

Client 2 Client 2 USA20
Client 2Client 2 EUR30
Client 3Client 3 UK40



The result I would like to achieve in a measure is, 

If(
Selectevalue(Table 1[Client]) = Selectedvalue(Table 2[Client Name]),
Table 2[Identifier]&"-"&Table 2[Value]
)

My problem: I can not seem to reference table 2 as in the bolded part. Could some explain why and provide a solution?


2 REPLIES 2
ValtteriN
Super User
Super User

Hi,

Similarly to your if condition use a function like SELEDTEDVALUE or MAX and you can see the result. 

E.g.

Measure_ = If(
Selectedvalue('Table (3)'[Client ]) = Selectedvalue('Table (4)'[Client Name]),
max('Table (4)'[Identifier])&"-"&MAX('Table (4)'[Value])
)

ValtteriN_0-1696929277682.png

 

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/





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

Proud to be a Super User!




No sorry this does not work. 

Why do you use a max function, when the identifier column is a string?

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.