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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
PowerBITestingG
Resolver I
Resolver I

Replicate self join with measure

I have a report with a live connection to a model.

 

I have the following table:

CountryCodeMessage
USA999All is well
Canada999Error today

 

 

And I want to create another column that only contains the messaged for Canada-Code

CountryCodeMessageMessage Canada
USA999All is wellError today
USA999All is wellError today

 

Any idea of how to do that only using a measure? What I was doing before was loading a new table with just the data for Canada and then joining to the original table.

 

1 ACCEPTED SOLUTION
PowerBITestingG
Resolver I
Resolver I

 

Ok I have solved it

 

Canada Message =
var selec = SELECTEDVALUE(Code)

return
CALCULATE(max(message),FILTER(all(message table),Country="Canada" && Code=selec))

View solution in original post

1 REPLY 1
PowerBITestingG
Resolver I
Resolver I

 

Ok I have solved it

 

Canada Message =
var selec = SELECTEDVALUE(Code)

return
CALCULATE(max(message),FILTER(all(message table),Country="Canada" && Code=selec))

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.