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.
I have difficulties with finding duplicates in rows for the selected time period. Could you please help to solve this out.
1. I need to find duplicated rows in a table which has the same Inventory Nr, Address and Weight. So first of all I do CONCATENATE function for 3 columns. As a result I have to show only those records which repeats in the selected period, for ex. from March 1st until March 31st.
According to my calculation I see too many lines, because it finds duplicates in the other periods as well. It should be only marked records.
2. In a separate cards I have to show duplicated rows and distinct rows.
Thank you in advance!
Solved! Go to Solution.
Hi @Godasa,
You can enable 'conditional formatting' -> 'font color' formatted by 'field value' with below measure formula to hight light duplicate rows:
Measure =
VAR selected =
ALLSELECTED ( Calendar[Date] )
VAR rowcount =
CALCULATE (
COUNTROWS ( table[CONCATENATE] ),
FILTER ( ALLSELECTED ( table ), [Date] IN selected ),
VALUES ( table[CONCATENATE] )
)
RETURN
IF ( rowcount > 1, "Yellow", "Black" )
Use conditional formatting in tables
Regards,
Xiaoxin Sheng
@Godasa , Assume for a" key" column you want fine what is the count of keys have to duplicate you can do like
countx(filter(summarize(table, table[Key], "_1", distinctcount(Table[Key]),"_2",count(Table[Key])),[_1]<>[_2]),[Key])
Hi @amitchandak ,
I'm trying to understand your solution, but please explain, what table[Key] means?
I understand that after CONCATENATE function I have to create column as "Index" (or "Key"). How this "Key" column should be written? When i have "key"column I can use your provided formula. I'm I right?
My data looks like this:
Thank you 🙂
Hi @Godasa,
You can enable 'conditional formatting' -> 'font color' formatted by 'field value' with below measure formula to hight light duplicate rows:
Measure =
VAR selected =
ALLSELECTED ( Calendar[Date] )
VAR rowcount =
CALCULATE (
COUNTROWS ( table[CONCATENATE] ),
FILTER ( ALLSELECTED ( table ), [Date] IN selected ),
VALUES ( table[CONCATENATE] )
)
RETURN
IF ( rowcount > 1, "Yellow", "Black" )
Use conditional formatting in tables
Regards,
Xiaoxin Sheng
Thank you @v-shex-msft for the formula and explanation. I tried a little bit easier way of solution, which seams to be working. My formula looks like this:
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 | |
100 | |
81 | |
70 | |
62 |
User | Count |
---|---|
148 | |
116 | |
104 | |
90 | |
65 |