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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Syndicate_Admin
Administrator
Administrator

Count the number of times a value is repeated for 2 conditions

Hello, it is likely that there is some post where this topic has already been discussed, but after several days searching I have not found anything that has helped me to solve the problem.

I have a table where 3 columns appear (OPERATOR, MANUFACTURED ARTICLE AND DATE) as I show in the table below

Operator NameArticleDate
BorjaA01-Apr-22
JonA01-Apr-22
AsierA01-Apr-22
RicardoB01-Apr-22
IñakiC01-Apr-22
CristinaD01-Apr-22
GorkaC01-Apr-22
AsierA02-Apr-22
BorjaD02-Apr-22
CristinaB02-Apr-22
RicardoA02-Apr-22
IñakiB03-Apr-22
JonD03-Apr-22
CristinaB03-Apr-22
GorkaC03-Apr-22

I need to create a new attached column where I count the number of times that the operator has manufactured X article as I show below

Operator NameArticleDate Number of times you have manufactured the item
BorjaA01-Apr-22 1
JonA01-Apr-22 1
AsierA01-Apr-22 2
RicardoB01-Apr-22 1
IñakiC01-Apr-22 1
CristinaD01-Apr-22 1
GorkaC01-Apr-22 2
AsierA02-Apr-22 2
BorjaD02-Apr-22 1
CristinaB02-Apr-22 2
RicardoA02-Apr-22 1
IñakiB03-Apr-22 1
JonD03-Apr-22 1
CristinaB03-Apr-22 2
GorkaC03-Apr-22 1

I have tried in several ways with FUNCTIONS COUNT, SUMMARIZE, GROUPBY, FILTER...... but I can't visualize what I need.

Greetings and thanks in advance.

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

It is for creating a new calculated column.

Jihwan_Kim_0-1663770154319.png

 

 

Expected result CC =
COUNTROWS (
    FILTER (
        Data,
        Data[Operator Name] = EARLIER ( Data[Operator Name] )
            && Data[Article] = EARLIER ( Data[Article] )
    )
)

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

View solution in original post

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

It is for creating a new calculated column.

Jihwan_Kim_0-1663770154319.png

 

 

Expected result CC =
COUNTROWS (
    FILTER (
        Data,
        Data[Operator Name] = EARLIER ( Data[Operator Name] )
            && Data[Article] = EARLIER ( Data[Article] )
    )
)

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Thank you very much, it works perfectly!

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.