Forum Discussion
Create new column with formula
Hi All,
I would like to create a 3rd column in my table summarizing the number of time the value in column B is repeated based on ID column A such as the below:
| ID | Value | Result column |
| ID1 | A | 3 |
| ID1 | A | 3 |
| ID2 | A | 1 |
| ID3 | B | 1 |
| ID1 | B | 2 |
| ID1 | B | 2 |
| ID3 | A | 2 |
| ID3 | A | 2 |
| ID4 | A | 1 |
| ID1 | A | 3 |
As a second step, I will be able to say per ID what is the most frequent value using max formula.
Any one can help to find the right formula to create the column C in Power BI?
Thanks,
Louise
- Anonymous6 years ago
Hi Anonymous ,
Create a Calculated Column
ResultsColumn1 =COUNTROWS(FILTER(ALL('Table'),'Table'[ID] = EARLIER('Table'[ID]) && 'Table'[Value] = EARLIER('Table'[Value])))Regards,
Harsh NathaniDid I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
Anonymous , Create a new column
Result = countx(filter(table,[ID]=earlier([ID]) && [Value]=earlier([Value])),[ID])
2 Replies
- AnonymousNot applicable
Hi Anonymous ,
Create a Calculated Column
ResultsColumn1 =COUNTROWS(FILTER(ALL('Table'),'Table'[ID] = EARLIER('Table'[ID]) && 'Table'[Value] = EARLIER('Table'[Value])))Regards,
Harsh NathaniDid I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
- amitchandakSuper User
Anonymous , Create a new column
Result = countx(filter(table,[ID]=earlier([ID]) && [Value]=earlier([Value])),[ID])