Join 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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Good
I am trying to create a column that gives me the most repeated value for a certain value. For this I have made a Count column, where I calculate how much the value is repeated.
I need to fill in the column name + repeated, with the name that is repeated the most for each code.
Thank you!
Solved! Go to Solution.
Hi @Syndicate_Admin ,
try this column
Column =
VAR _MaxCount =
MAXX(
FILTER(
'Table',
'Table'[Code] = EARLIER('Table'[Code])
),
'Table'[Count]
)
RETURN
SELECTCOLUMNS(
FILTER(
'Table',
'Table'[Code] = EARLIER('Table'[Code]) && 'Table'[Count] = _MaxCount
),
"Nombre",[Nombre]
)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Syndicate_Admin ,
You can try this method:
Name + repeated =
VAR _max =
CALCULATE ( MAX ( 'Table'[Count] ), ALLEXCEPT ( 'Table', 'Table'[Code] ) )
RETURN
CALCULATE ( MAX ( 'Table'[Number] ), FILTER ( 'Table', 'Table'[Count] = _max ) )
The result is:
Hope this helps you.
Here is my PBIX file.
Best Regards,
Community Support Team _Yinliw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Syndicate_Admin ,
try with this calculated column
Column =
VAR _MaxCount = MAX('Table'[Count])
RETURN
SELECTCOLUMNS(
FILTER(
'Table',
'Table'[Count] = _MaxCount
),
"Nombre",[Nombre]
)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Syndicate_Admin , The information you have provided is not making the problem clear to me. Can you please explain with an example.
Appreciate your Kudos.
Good
I have prepared a table to try to explain it. I want the column "name + repeated" to take the value of "Name" that is repeated more times for a code.
That is, for Code MI-0876 that has three entries, put the value of Peter.
Code | Count | Number | Name + repeated |
MI-0876 | 10 | Louis | Pedro |
MI-0876 | 20 | Pedro | Pedro |
MI-0876 | 5 | Antonio | Sedro |
MU-098 | 1 | Sofia | Sofia |
MU-0781 | 4 | Alejandra | Alejandra |
thanks and greetings
Hi @Syndicate_Admin ,
You can try this method:
Name + repeated =
VAR _max =
CALCULATE ( MAX ( 'Table'[Count] ), ALLEXCEPT ( 'Table', 'Table'[Code] ) )
RETURN
CALCULATE ( MAX ( 'Table'[Number] ), FILTER ( 'Table', 'Table'[Count] = _max ) )
The result is:
Hope this helps you.
Here is my PBIX file.
Best Regards,
Community Support Team _Yinliw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Syndicate_Admin ,
try this column
Column =
VAR _MaxCount =
MAXX(
FILTER(
'Table',
'Table'[Code] = EARLIER('Table'[Code])
),
'Table'[Count]
)
RETURN
SELECTCOLUMNS(
FILTER(
'Table',
'Table'[Code] = EARLIER('Table'[Code]) && 'Table'[Count] = _MaxCount
),
"Nombre",[Nombre]
)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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.