Forum Discussion
PowerBITestingG
Resolver I
3 years agoReplicate self join with measure
I have a report with a live connection to a model.
I have the following table:
| Country | Code | Message |
| USA | 999 | All is well |
| Canada | 999 | Error today |
And I want to create another column that only contains the messaged for Canada-Code
| Country | Code | Message | Message Canada |
| USA | 999 | All is well | Error today |
| USA | 999 | All is well | Error 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.
Ok I have solved it
Canada Message =
var selec = SELECTEDVALUE(Code)
return
CALCULATE(max(message),FILTER(all(message table),Country="Canada" && Code=selec))
1 Reply
- PowerBITestingG
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))