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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Anonymous
Not applicable

Summarize table with filtering only values that are duplicated 3 times

Hi everyone,

 

 

I have a table of customers with invoice date like the following:

 

 

Customer NumberInvoice Date
12311/18/2020
12311/17/2020
12311/16/2020
12411/16/2020
12411/15/2020
12511/16/2020

 

 

 

I'm trying to summrize the table to have the distinct customer number who have 3 or more invoices, I tried the following dax code but it returning the whole list of customers without in filtering, it should return a list of only one customer which is "123".

 

This is the PBIX.

 

 

 

Table = SUMMARIZE(FILTER('Customer Invoices',DISTINCTCOUNT('Customer Invoices'[Invoice Date])>=3),'Customer Invoices'[Customer Number])

 

 

 

 

1 ACCEPTED SOLUTION
mahoneypat
Microsoft Employee
Microsoft Employee

Please use this expression instead

 

Table 2 =
FILTER (
    DISTINCT ( 'Customer Invoices'[Customer Number] ),
    CALCULATE (
        COUNT ( 'Customer Invoices'[Invoice Date] )
    ) >= 3
)

 
Regards,
Pat




Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
mahoneypat
Microsoft Employee
Microsoft Employee

Please use this expression instead

 

Table 2 =
FILTER (
    DISTINCT ( 'Customer Invoices'[Customer Number] ),
    CALCULATE (
        COUNT ( 'Customer Invoices'[Invoice Date] )
    ) >= 3
)

 
Regards,
Pat




Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Anonymous
Not applicable

Thanks it works!

 

Though I have a quiestion can I insert a filter to just return the October distinct values for example like this filter month(invoice Date)=10?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Kudoed Authors