Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
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.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.