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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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

Click here to schedule a short Teams meeting to discuss your question.

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

Click here to schedule a short Teams meeting to discuss your question.

Thank you very much, it works perfectly!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.