Forum Discussion
Anonymous
5 years agoNot applicable
Checking for different values in duplicates
Good day all, I have a table in Power Bi that looks similar to this: What I need to get is a column called Age_Check that would output 1 if for every group of records with the same name wh...
- 5 years ago
Anonymous , Seem like missed age logic, Try this
Age_check =
var _1 = countx(filter(Table,table[Name] = earlier(Table[Name])),Table[Name])
var _2 = countx(filter(Table,table[Name] = earlier(Table[Name]) && table[Age] = earlier(Table[age])),Table[Name])
return
if(_1 >1 && _1<> _2 ,1,0)
amitchandak
Super User
5 years agoAnonymous , Seem like missed age logic, Try this
Age_check =
var _1 = countx(filter(Table,table[Name] = earlier(Table[Name])),Table[Name])
var _2 = countx(filter(Table,table[Name] = earlier(Table[Name]) && table[Age] = earlier(Table[age])),Table[Name])
return
if(_1 >1 && _1<> _2 ,1,0)
Anonymous
5 years agoNot applicable
This worked! Appreciate the support