Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe 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.
Hi everyone,
I have a table of customers with invoice date like the following:
Customer Number | Invoice Date |
123 | 11/18/2020 |
123 | 11/17/2020 |
123 | 11/16/2020 |
124 | 11/16/2020 |
124 | 11/15/2020 |
125 | 11/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".
Table = SUMMARIZE(FILTER('Customer Invoices',DISTINCTCOUNT('Customer Invoices'[Invoice Date])>=3),'Customer Invoices'[Customer Number])
Solved! Go to Solution.
Please use this expression instead
Table 2 =
FILTER (
DISTINCT ( 'Customer Invoices'[Customer Number] ),
CALCULATE (
COUNT ( 'Customer Invoices'[Invoice Date] )
) >= 3
)
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Hi,
You may download my PBI file from here.
Hope this helps.
Please use this expression instead
Table 2 =
FILTER (
DISTINCT ( 'Customer Invoices'[Customer Number] ),
CALCULATE (
COUNT ( 'Customer Invoices'[Invoice Date] )
) >= 3
)
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
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?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
86 | |
81 | |
53 | |
37 | |
35 |