Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I am trying to create a Column that only show the value if is duplicate on the first line. rather than repeating the distinc count on every single row.. I added the earlier on ID and also on RowNumber but get same results.
| RowNumber | ID | DistinctCount | Show only Once |
| 1 | 5343 | 2 | 2 |
| 3 | 5343 | 2 | |
| 4 | 4333 | 2 | 2 |
| 5 | 4333 | 2 | |
| 6 | 1333 | 1 | 1 |
Solved! Go to Solution.
There might be a faster way to do this, but this builds each step one at a time @Anonymous
First Distinct =
VAR varCurrentID = [ID]
VAR varCurrentRow = 'DataTable'[RowNumber]
VAR varFirstRow =
MINX(
FILTER(
'DataTable',
'DataTable'[ID] = varCurrentID
),
'DataTable'[RowNumber]
)
VAR varCounts =
COUNTX(
FILTER(
'DataTable',
'DataTable'[ID] = varCurrentID
),
'DataTable'[ID]
)
RETURN
IF(
varCurrentRow = varFirstRow,
varCounts,
BLANK()
)
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingThank You for quick response...Edhans😀
Glad to help @Anonymous
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingThere might be a faster way to do this, but this builds each step one at a time @Anonymous
First Distinct =
VAR varCurrentID = [ID]
VAR varCurrentRow = 'DataTable'[RowNumber]
VAR varFirstRow =
MINX(
FILTER(
'DataTable',
'DataTable'[ID] = varCurrentID
),
'DataTable'[RowNumber]
)
VAR varCounts =
COUNTX(
FILTER(
'DataTable',
'DataTable'[ID] = varCurrentID
),
'DataTable'[ID]
)
RETURN
IF(
varCurrentRow = varFirstRow,
varCounts,
BLANK()
)
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingCheck out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 5 | |
| 5 | |
| 4 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 24 | |
| 21 | |
| 12 | |
| 11 | |
| 10 |