Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Dear community,
I am very new to PowerBI and have been searching for a workable solution for my issue for some time. I believe that the solution must be rather simple, but I could not make any of the proposed solutions work.
My goal: I have a table with 2 columns: ID and Product. Some IDs are duplicated. I want to add a third column in which the number of duplications for the ID in the same row is pointed out.
Example result (Table1):
ID | Product | No of Duplicates |
123 | A | 1 |
124 | B | 2 |
124 | C | 2 |
125 | D | 1 |
126 | E | 1 |
127 | F | 3 |
127 | G | 3 |
127 | H | 3 |
Progress:
I tried a couple of formulas, but somehow fishing in the dark. Especially, I dont get the EARLIER working, which I assume could solve the problem at hand.
No of Duplicates = CALCULATE(
COUNT('Table1'[ID]),
FILTER('Table1', 'Table1'[ID] = EARLIER(ID)))
No of Duplicates =
CALCULATE (
COUNTROWS(FILTER('Table1',
'Table1'[ID]='Table1'[ID]
)
))
If someone could help me here, that would be highly appreciated. Thanks a lot for any support in advance.
Solved! Go to Solution.
Measure = calculate(count(tbl[id]),allexcept(tbl,tbl[id]))
Hi,
This calculated column formula works
=CALCULATE(COUNTROWS(Data),FILTER(Data,Data[ID]=EARLIER(Data[ID])))
Measure = calculate(count(tbl[id]),allexcept(tbl,tbl[id]))
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
150 | |
115 | |
104 | |
89 | |
65 |