Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I have a table like below. I would like find find common names present in the table.
Data structure - the names will name be same under unique ID and under unique sub ID. But it could be same if unique ID and unique sub ID changes. I want common names to be present like the last column as an output using dax. Appreciate your guidance on this.
Thanks.
Unique ID | Unique Sub ID | Name | Common Names under unique ID |
A | 1 | Jack | Jack |
A | 1 | Rajesh | Rajesh |
A | 1 | Karan | |
A | 2 | Rajesh | Rajesh |
A | 2 | Jack | Jack |
A | 2 | Ani | |
B | 3 | Jack | |
B | 3 | Karan | Karan |
B | 4 | Karan | Karan |
B | 4 | Clark |
|
Solved! Go to Solution.
@Rahul_SC , try like
New Measure=
var _cnt = countx(filter(allselected(Table) , [Unique ID] = Max([Unique ID]) && [Name] = Max([Name]) ), [Name])
return
if(_cnt >1, [Name], blank())
or
New Measure=
var _cnt = countx(filter(allselected(Table) , [Unique ID] = Max([Unique ID]) && [Name] = Max([Name]) ), [Name])
return
if(_cnt >1, [Name], "")
@Rahul_SC , Based on what I got
New colum =
var _cnt = countx(filter(Table, [Unique ID] = earlier([Unique ID]) && [Name] = earlier([Name]) ), [Name])
return
if(_cnt >1, [Name], blank())
@Rahul_SC , try like
New Measure=
var _cnt = countx(filter(allselected(Table) , [Unique ID] = Max([Unique ID]) && [Name] = Max([Name]) ), [Name])
return
if(_cnt >1, [Name], blank())
or
New Measure=
var _cnt = countx(filter(allselected(Table) , [Unique ID] = Max([Unique ID]) && [Name] = Max([Name]) ), [Name])
return
if(_cnt >1, [Name], "")
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
26 | |
19 | |
14 | |
10 |
User | Count |
---|---|
57 | |
49 | |
44 | |
18 | |
18 |