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
II1154
Frequent Visitor

count the number of occurrences greater than 4 in a cell

Bonjour j’ai une colonne sous powerBI qui contient des nombres décimaux, de 1 à X Je souhaite compter le nombre d’occurrences supérieures à 4 dans une cellule grâce à une mesure à l’avance merci de votre aide

colonne de 1 à Xinférieur 4
4,5;3;2;7;9;23
4,5;3;2;72
3;2;7;9;42
9,1;5,41
4,5;3;7;9;61
4,5;3;2;7;9;72
4,5;3;2;7;9;82
1 ACCEPTED SOLUTION
ronrsnfld
Super User
Super User

I don't understand. Your title and text indicate you want a count of the values greater than 4 (>4); but your example shows values less than 4 (<4) except for your 4th line: 9,1;5,4 for which you show a count of one (1).

 

Why is that line showing a count of one (1)?

I am assuming you use the comma for a decimal, and the semicolon is separating the different values in the cell. If that is not the case, please clarify.

 

What do you really want?

If you want values less than 4, add a custom column in Power Query with the formula:

 

=List.Count(List.Select(List.Transform(Text.Split([colonne de 1 à X],";"), each Number.From(_, "fr-FR")), each _ < 4))

 

If you want values greater than 4, just change the comparison:

 

=List.Count(List.Select(List.Transform(Text.Split([colonne de 1 à X],";"), each Number.From(_, "fr-FR")), each _ > 4))

 

 

View solution in original post

2 REPLIES 2
ronrsnfld
Super User
Super User

I don't understand. Your title and text indicate you want a count of the values greater than 4 (>4); but your example shows values less than 4 (<4) except for your 4th line: 9,1;5,4 for which you show a count of one (1).

 

Why is that line showing a count of one (1)?

I am assuming you use the comma for a decimal, and the semicolon is separating the different values in the cell. If that is not the case, please clarify.

 

What do you really want?

If you want values less than 4, add a custom column in Power Query with the formula:

 

=List.Count(List.Select(List.Transform(Text.Split([colonne de 1 à X],";"), each Number.From(_, "fr-FR")), each _ < 4))

 

If you want values greater than 4, just change the comparison:

 

=List.Count(List.Select(List.Transform(Text.Split([colonne de 1 à X],";"), each Number.From(_, "fr-FR")), each _ > 4))

 

 

Merci, cela fonctionne parfaitement

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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 Kudoed Authors