Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
My question is related to this question: Solved: Conditional Formatting Duplicate Records in Rows - Microsoft Power BI Community.
Specifically, I want to mark those rows in a visual which are duplicates. However, the answer in that question only works if there is only one duplicate. I can have more than 2, hence to mark when distinct count is 2 will not be sufficient.
How can I achieve this?
Solved! Go to Solution.
Hi @Anonymous ,
I created a sample pbix file(see attachment), please check whether that is what you want.
1. Create a measure as below to get the count of systems which per user logged into
Countofsystem =
CALCULATE (
DISTINCTCOUNT ( 'Table'[System] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Current User] = SELECTEDVALUE ( 'Table'[Current User] )
)
)
2. Create a measure as below to make conditional formatting rule
Conditional formatting = IF ( [Countofsystem] >= 2, "Red" )
3. Configure conditional formatting: select the visual and click the field "Current User", Conditional formatting-->Background color
Best Regards
Hi @Anonymous ,
I created a sample pbix file(see attachment), please check whether that is what you want.
1. Create a measure as below to get the count of systems which per user logged into
Countofsystem =
CALCULATE (
DISTINCTCOUNT ( 'Table'[System] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Current User] = SELECTEDVALUE ( 'Table'[Current User] )
)
)
2. Create a measure as below to make conditional formatting rule
Conditional formatting = IF ( [Countofsystem] >= 2, "Red" )
3. Configure conditional formatting: select the visual and click the field "Current User", Conditional formatting-->Background color
Best Regards
Thanks a lot!!! It did work!!!
HI @Anonymous ,
I would suggest creating another column on top of the calculated column suggested in the above solution on the forum:
countFlag =
IF(CountDistinct > 1, 1, 0)
Then use this column for conditional formatting. So, countFlag = 1 is taking into account all the duplicates with count more than 1.
Thanks,
Pragati
Hi @Pragati11
I created the columns as you suggested, however when I go to conditional formatting and select field, I can not select calculated columns.
Could you suggest how to workaround this?
Hi @Anonymous ,
You select the column in conditional formatting in the same way shown in the thread that you used for reference:
https://community.powerbi.com/t5/Desktop/Conditional-Formatting-Duplicate-Records-in-Rows/m-p/690739
Also it is always good to have some screenshots so that I can understand what you have done and trying to do 🙂
Thanks,
Pragati
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
143 | |
79 | |
63 | |
52 | |
47 |
User | Count |
---|---|
213 | |
89 | |
76 | |
66 | |
60 |