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
djwitkowski
Helper I
Helper I

Filter the results of a measure

Hello,

 

I am trying to count the number of duplicate items for X number of shipments selected. I have a measure:

Test1 = CALCULATE(DISTINCTCOUNT('To Power BI'[Material]), FILTER('To Power BI', COUNT('To Power BI'[Shipment Number]) > 1))
 
This seems to somewhat work, because it puts a 1 next to each item that shows on more than 1 shipment, but the totals are incorrect. Any ideas how I can count the number of items that appear more than once on the selected shipments?
 
djwitkowski_0-1624627772585.png

Thanks!

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

https://www.dropbox.com/s/50pyxt1b7a5t5to/djwit.pbix?dl=0

 

 

Test1 =
CALCULATE (
DISTINCTCOUNT ( 'To Power BI'[Material] ),
FILTER ( VALUES ( 'To Power BI'[Material] ), [Shipment Number] > 1 )
)

 

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

2 REPLIES 2
Fowmy
Super User
Super User

@djwitkowski 

Can you try this measure?

Test1 =
COUNTROWS (
    FILTER (
        SUMMARIZE (
            'To Power BI',
            'To Power BI'[Material],
            "C", COUNT ( 'To Power BI'[Shipment Number] )
        ),
        [C] > 1
    )
)

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Jihwan_Kim
Super User
Super User

https://www.dropbox.com/s/50pyxt1b7a5t5to/djwit.pbix?dl=0

 

 

Test1 =
CALCULATE (
DISTINCTCOUNT ( 'To Power BI'[Material] ),
FILTER ( VALUES ( 'To Power BI'[Material] ), [Shipment Number] > 1 )
)

 

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


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.