March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi
I have some data where each row is an individual. The rows of data are all unique but multiple rows may hold information about the same individual. I want to setup a variety of measures such as demorgraphic characteristics where you can toggle including all rows of data or just the unique ones. Can anyone help me with the correct DAX calculation?
I've put some dummy data together.
ID | First name | Surname | DOB | Gender | Date of record creation |
ID1 | Abe | Simpson | 01/05/1980 | Male | 01/01/2020 |
ID2 | Abe | Simpson | 01/05/1980 | Male | 02/01/2020 |
ID3 | Marge | Simpson | 01/04/1990 | Female | 01/01/2020 |
ID4 | Marge | Simpson | 01/04/1990 | Female | 02/01/2020 |
ID5 | Homer | Simpson | 01/04/1990 | Male | 03/01/2020 |
ID6 | Bart | Simpson | 01/05/1980 | Male | 03/01/2020 |
ID7 | Abe | Simpson | 01/10/1987 | Male | 03/01/2020 |
Thanks
arb
Solved! Go to Solution.
Hi @arb1782
add columns
Column =
RANKX (
FILTER (
'Table',
'Table'[First name] = EARLIER ( 'Table'[First name] )
&& 'Table'[Surname] = EARLIER ( 'Table'[Surname] )
&& 'Table'[DOB] = EARLIER ( 'Table'[DOB] )
&& 'Table'[Gender] = EARLIER ( 'Table'[Gender] )
),
[Date of record creation],
,
ASC,
DENSE
)
Column 2 = IF([Column]=1,"Unique","Repeat")
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @arb1782
add columns
Column =
RANKX (
FILTER (
'Table',
'Table'[First name] = EARLIER ( 'Table'[First name] )
&& 'Table'[Surname] = EARLIER ( 'Table'[Surname] )
&& 'Table'[DOB] = EARLIER ( 'Table'[DOB] )
&& 'Table'[Gender] = EARLIER ( 'Table'[Gender] )
),
[Date of record creation],
,
ASC,
DENSE
)
Column 2 = IF([Column]=1,"Unique","Repeat")
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks Maggie
Sure, something like the column at the end
ID | First name | Surname | DOB | Gender | Date of record creation | Unique or repeat individual? |
ID1 | Abe | Simpson | 01/05/1980 | Male | 01/01/2020 | Unique |
ID2 | Abe | Simpson | 01/05/1980 | Male | 02/01/2020 | Repeat |
ID3 | Marge | Simpson | 01/04/1990 | Female | 01/01/2020 | Unique |
ID4 | Marge | Simpson | 01/04/1990 | Female | 02/01/2020 | Repeat |
ID5 | Homer | Simpson | 01/04/1990 | Male | 03/01/2020 | Unique |
ID6 | Bart | Simpson | 01/05/1980 | Male | 03/01/2020 | Unique |
ID7 | Abe | Simpson | 01/10/1987 | Male | 03/01/2020 | Unique |
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
125 | |
81 | |
63 | |
54 | |
42 |
User | Count |
---|---|
194 | |
106 | |
90 | |
63 | |
51 |