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
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
Employee
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
Employee
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
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.