The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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 Name | Article | Date |
Borja | A | 01-Apr-22 |
Jon | A | 01-Apr-22 |
Asier | A | 01-Apr-22 |
Ricardo | B | 01-Apr-22 |
Iñaki | C | 01-Apr-22 |
Cristina | D | 01-Apr-22 |
Gorka | C | 01-Apr-22 |
Asier | A | 02-Apr-22 |
Borja | D | 02-Apr-22 |
Cristina | B | 02-Apr-22 |
Ricardo | A | 02-Apr-22 |
Iñaki | B | 03-Apr-22 |
Jon | D | 03-Apr-22 |
Cristina | B | 03-Apr-22 |
Gorka | C | 03-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 Name | Article | Date | Number of times you have manufactured the item | |
Borja | A | 01-Apr-22 | 1 | |
Jon | A | 01-Apr-22 | 1 | |
Asier | A | 01-Apr-22 | 2 | |
Ricardo | B | 01-Apr-22 | 1 | |
Iñaki | C | 01-Apr-22 | 1 | |
Cristina | D | 01-Apr-22 | 1 | |
Gorka | C | 01-Apr-22 | 2 | |
Asier | A | 02-Apr-22 | 2 | |
Borja | D | 02-Apr-22 | 1 | |
Cristina | B | 02-Apr-22 | 2 | |
Ricardo | A | 02-Apr-22 | 1 | |
Iñaki | B | 03-Apr-22 | 1 | |
Jon | D | 03-Apr-22 | 1 | |
Cristina | B | 03-Apr-22 | 2 | |
Gorka | C | 03-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.
Solved! Go to Solution.
Hi,
Please check the below picture and the attached pbix file.
It is for creating a new calculated column.
Expected result CC =
COUNTROWS (
FILTER (
Data,
Data[Operator Name] = EARLIER ( Data[Operator Name] )
&& Data[Article] = EARLIER ( Data[Article] )
)
)
Hi,
Please check the below picture and the attached pbix file.
It is for creating a new calculated column.
Expected result CC =
COUNTROWS (
FILTER (
Data,
Data[Operator Name] = EARLIER ( Data[Operator Name] )
&& Data[Article] = EARLIER ( Data[Article] )
)
)
Thank you very much, it works perfectly!
User | Count |
---|---|
68 | |
63 | |
59 | |
54 | |
28 |
User | Count |
---|---|
183 | |
80 | |
62 | |
46 | |
38 |