Forum Discussion
Rygaard
3 years agoResolver I
Count rows (duplicates) in Query Editor
I have a table "Sales _Offers" and i have a column "Name_trimmed_striped" I want to add a new column that make a count for each line how many times it occures (NOT IN DAX, but still in the impo...
Anonymous
3 years agoNot applicable
Hi Rygaard ,
Please try below steps:
1. below is my test table
Table:
2. create measure with below dax formula
Measure =
VAR cur_nts =
SELECTEDVALUE ( 'Table'[Name_trimmed_striped] )
VAR tmp =
FILTER ( ALL ( 'Table' ), 'Table'[Name_trimmed_striped] = cur_nts )
VAR tmp1 =
SUMMARIZE ( tmp, [Name_trimmed_striped], "CTR", COUNT ( [Customer] ) )
VAR _str =
CONCATENATEX ( tmp1, [Name_trimmed_striped] & [CTR], "" )
VAR num =
LEN ( cur_nts )
VAR _val =
MID ( _str, num + 1, LEN ( _str ) )
RETURN
_val
3. add a table visual with fields and measure
Please refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.