Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
My requirement is that I have a table where I need to check whether the column values are duplicated or distinct based on another column selection with more than 1 value selected.
Steps:
1. From below table First Concatenate HPPN & MPN columns .
2. Now Countrows based on HPPN_MPN concatenated column
ex: check HPPN1_MPN1 is reflecting in any other SKU from SKU1.
In SKU2 also HPPN1_MPN1 is available so this is common in both SKU1 and SKU2.
3. Till here i was able to do by using countrows.
| SKU | HPPN | MPN | Product selected | Common/Distinct |
| SKU1 | HPPN1 | MPN1 | TRUE | Common |
| SKU1 | HPPN1 | MPN2 | TRUE | Common |
| SKU1 | HPPN1 | MPN3 | TRUE | Common |
| SKU1 | HPPN2 | MPN4 | TRUE | Common |
| SKU1 | HPPN2 | MPN5 | TRUE | Common |
| SKU1 | HPPN3 | MPN6 | TRUE | Distinct |
| SKU1 | HPPN3 | MPN7 | TRUE | Distinct |
| SKU1 | HPPN4 | MPN8 | TRUE | Distinct |
| SKU1 | HPPN5 | MPN9 | TRUE | Distinct |
| SKU1 | HPPN6 | MPN10 | TRUE | Distinct |
| SKU2 | HPPN7 | MPN11 | TRUE | Distinct |
| SKU2 | HPPN8 | MPN12 | TRUE | Distinct |
| SKU2 | HPPN2 | MPN4 | TRUE | Common |
| SKU2 | HPPN2 | MPN5 | TRUE | Common |
| SKU2 | HPPN1 | MPN1 | TRUE | Common |
Solved! Go to Solution.
Hi @Bhaskar_K1986 ,
Since the calculated column is recomputed when the memory is refreshed, it will not be interacting with the slicer when it finishes its calculation. So if you want to get dynamic results, you may consider using a measure to handle this question.
Please new a measure:
Common/Distinct =
VAR _HPPN =
MAX ( 'Table'[HPPN] )
VAR _MPN =
MAX ( 'Table'[MPN] )
VAR _count =
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[HPPN] = _HPPN && 'Table'[MPN] = _MPN )
)
VAR _result =
IF ( _count > 1, "Common", "Distinct" )
RETURN
_result
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
Hi @Bhaskar_K1986 ,
Since the calculated column is recomputed when the memory is refreshed, it will not be interacting with the slicer when it finishes its calculation. So if you want to get dynamic results, you may consider using a measure to handle this question.
Please new a measure:
Common/Distinct =
VAR _HPPN =
MAX ( 'Table'[HPPN] )
VAR _MPN =
MAX ( 'Table'[MPN] )
VAR _count =
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[HPPN] = _HPPN && 'Table'[MPN] = _MPN )
)
VAR _result =
IF ( _count > 1, "Common", "Distinct" )
RETURN
_result
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 8 | |
| 7 | |
| 6 |