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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Count of duplicates above a certain value

Hi everyone! I need help with a chart that shows how many times a person worked less than 2 times on a month but more than 0. The database looks like this:

ID   Date              Month
1    1-1-2019       Jan
1    1-2-2019       Jan
1    20-2-2019     Feb
2    10-1-2019     Feb
2    15-2-2019     Feb
2    15-3-2019     Mar
3    1-3-2019       Mar

3    2-3-2019       Mar

3   3-3-2019        Mar


The table shows the ID of the person and the date and month when the person worked. So, if I have a chart with "Number of persons v/s Months" the table of this chart would be:

Month | Number of persons
Jan         2 
Feb        1
Mar       1

Still don't know how to make this count,

Thank you for your time,
Best regards,
Gabriela

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Anonymous ,

 

Try the following code for a measure:

 

Count below 2 times =
COUNTROWS (
    FILTER (
        SUMMARIZE ( Table; Table[Month]; Table[ID]; "CountID"; COUNT ( Table[ID] ) );
        [CountID] < 2
    )
)

Regards.

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

4 REPLIES 4
MFelix
Super User
Super User

Hi @Anonymous ,

 

Try the following code for a measure:

 

Count below 2 times =
COUNTROWS (
    FILTER (
        SUMMARIZE ( Table; Table[Month]; Table[ID]; "CountID"; COUNT ( Table[ID] ) );
        [CountID] < 2
    )
)

Regards.

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

Hi @MFelix exactly that's the solution! thanks a lot! 🙂
I'd appreciate if you could help me with a little detail: ¿how can I show 0 on the months I have 0? because now the months with 0 just disappear from the visual and I want them present but with a bar on 0 level, is that possible?

Best regards,
Gabriela

Hi @Anonymous 

 

Try to add +0 to the measure.

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

Excellent! Thanks@MFelix !! I made such a big bypass to solve it haha now It looks like it should,

Have a great week 🙂
Gabriela

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.