Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
whitefomalhaut
Regular Visitor

Only dublicates count

Hi, Im new in Power BI, so I hope someone will help,I need measure that count only values of dublicates without counting of other data in one Column that counts more than once

a
a
a
b
c
d
f
g
h
b

 

I need count 2 (only aaa and bb) how is it possible?

 

1 ACCEPTED SOLUTION

Yes, @whitefomalhaut

But this solution can be simple realise with calculated column. With measure is IMHO a little complex.

Look: 

 

Calculated_Column = IF(CALCULATE(COUNTROWS(Table1);ALLEXCEPT(Table1;Table1[Data]))>1;
1/CALCULATE(COUNTROWS(Table1);ALLEXCEPT(Table1;Table1[Data]));BLANK())

Not_Blank_Counting(2).png

The new EXAMPLE code is here to

Best regs

View solution in original post

5 REPLIES 5
McCow
Resolver III
Resolver III

Hi @whitefomalhaut!

 

You need a measure like this:

Measure = 
VAR __Count = CALCULATE(COUNTROWS(Table1);ALLEXCEPT(Table1;Table1[Data]))
RETURN
IF(__Count >1;__Count;BLANK())

Example code is HERE

 

The white table is yours source data, the yellow is a requested result. Indeed?

 

Multiple values count onlyMultiple values count only

Here is the trick for correct visualisation (thx @Vvelarde)


Best regards

Hi, ty for your answer, is it possible to count every aaa and bb as 1 not 2 and 3 in total i need count as 2 

Yes, @whitefomalhaut

But this solution can be simple realise with calculated column. With measure is IMHO a little complex.

Look: 

 

Calculated_Column = IF(CALCULATE(COUNTROWS(Table1);ALLEXCEPT(Table1;Table1[Data]))>1;
1/CALCULATE(COUNTROWS(Table1);ALLEXCEPT(Table1;Table1[Data]));BLANK())

Not_Blank_Counting(2).png

The new EXAMPLE code is here to

Best regs

Thank you

glad to help you

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.