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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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