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.
Hi pros,
I tried to create a column to number (multi conditions) duplicates
The Numbering Duplicates should be looked like this:
Tran Name | Date | [expect] Numbering Duplicates |
VCCB | 01 Jan 2020 | 1 |
VCCB | 01 Jan 2020 | 2 |
VCBF | 02 Jan 2020 | 1 |
VCCB | 03 Jan 2020 | 1 |
TCBF | 03 Jan 2020 | 1 |
TCBF | 03 Jan 2020 | 2 |
TCBF | 03 Jan 2020 | 3 |
This thing is easilly done in excel =COUNTIFS($A$1:A2,A2,$B$1:B2,B2) (assumed data started in A1)
Please help to do this without supporting column(s), thank you.
Solved! Go to Solution.
Hi, @navafolk
Dax will identify the duplicates as the same row. It is unavailable to reach your requirement without creating an index column. I'd like to suggest you create an index column.
You may click 'Edit Query', go to Query Editor, click 'Add Columns' ribbon, 'Index column'.
You may create a measure as follows.
Numbering Duplicates =
var _index = MAX('Table'[Index])
var _name = MAX('Table'[Tran Name])
var _date = MAX('Table'[Date])
return
IF(
ISFILTERED('Table'[Tran Name]),
COUNTROWS(
FILTER(
ALL('Table'),
'Table'[Index]<=_index&&
'Table'[Tran Name] = _name&&
'Table'[Date] = _date
)
)
)
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @navafolk
Dax will identify the duplicates as the same row. It is unavailable to reach your requirement without creating an index column. I'd like to suggest you create an index column.
You may click 'Edit Query', go to Query Editor, click 'Add Columns' ribbon, 'Index column'.
You may create a measure as follows.
Numbering Duplicates =
var _index = MAX('Table'[Index])
var _name = MAX('Table'[Tran Name])
var _date = MAX('Table'[Date])
return
IF(
ISFILTERED('Table'[Tran Name]),
COUNTROWS(
FILTER(
ALL('Table'),
'Table'[Index]<=_index&&
'Table'[Tran Name] = _name&&
'Table'[Date] = _date
)
)
)
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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 |
---|---|
113 | |
99 | |
80 | |
70 | |
59 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |