Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Calculated column to find most repeated value

Hi, need some help on a calculated column to get the column 4 "result - most visited" based on column 1& 3 (name, visited). the result has to be the most repeated value in column 3(visited) for that particular name.

 

Appreciated for your help

 

Thanks

 

Table:

name   month   visited    result - most visited

mikeJanLADallas
mikeJanDallasDallas
mikeJanAustinDallas
mikeFebDallasDallas
DanmarchNJNJ
samJanNYLA
sammarchLALA
sammarchLALA
sammarchAustinLA
2 REPLIES 2
Anonymous
Not applicable

@Anonymous Here is my approach

First create a calculated column to get the count of visit by name and visited

VisitCount = CALCULATE(COUNT('Table'[Visited]),ALLEXCEPT('Table','Table'[Name],'Table'[Visited]))

Then create a measure to get the name of city

Measure = 
VAR _max = CALCULATE(MAX('Table'[VisitCount]),ALLEXCEPT('Table','Table'[Name]))
RETURN CALCULATE(MAX('Table'[Visited]),FILTER(ALLEXCEPT('Table','Table'[Name]),'Table'[VisitCount]=_max))

 

Anonymous
Not applicable

Would give the solution if I could, this worked for me.

Thanks.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.