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

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.

Reply
fabio7xavier
Frequent Visitor

Count of occurences to use on slicer

I have a table with two columns, one with a name and another with a value (1 or 0).

I want to count the number of occurences of the value 1 to each name (that could be duplicate).

 

For example, I have this table

NameValue
A10
A11
A11
A20
A20
A31
A31
A40
A41

 

And I want to get something like this

 

NameValueOccurences
A102
A112
A112
A200
A200
A311
A311
A401
A411

 

My goal is to use the result/calculated column as a slicer, with the number of occurences of 1's as options, to filter list of names.

print help.jpg

 

I already created this DAX measure to do it but i can't use it as a slicer

rank = CALCULATE(COUNT(Table[Value]);FILTER(Table;Table[Value] = 1)).

 

Any suggest how can I work around this problem?

 

Thank you in advice!

 

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

You don't need any measure for this. See the attached file.

 

Best

D

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

You don't need any measure for this. See the attached file.

 

Best

D

az38
Community Champion
Community Champion

Hi @fabio7xavier 

try a measure

Occurences = CALCULATE(COUNTROWS(Table); ALLEXCEPT(Table; Table[Name]); Table[Value]=1)

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

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.

Top Solution Authors