Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi everyone,
I have an issue on DAX that I can't solve, maybe someone could help.
Here is my example
My problem: I would like to count the number of new customers who bought in April ONLY and not during previous months.
In our case, 2 new customers (customer C & D)
Let's imagine a purchase teble like below:
Customer | Month of purchase |
A | 1 |
A | 2 |
A | 4 |
B | 1 |
B | 3 |
C | 4 |
C | 4 |
D | 4 |
Solved! Go to Solution.
Apr ONLY =
CONCATENATEX(
FILTER(
CALCULATETABLE( VALUES( SALES[Customer] ), SALES[Month of purchase] = 4 ),
CALCULATE( ISEMPTY( SALES ), SALES[Month of purchase] <> 4 )
),
SALES[Customer],
", "
)
Expertise = List.Accumulate( {Days as from Today}, {Skills and Knowledge}, (Current, Everyday) => Current & Day.LearnAndPractise(Everyday) ) |
Apr ONLY =
CONCATENATEX(
FILTER(
CALCULATETABLE( VALUES( SALES[Customer] ), SALES[Month of purchase] = 4 ),
CALCULATE( ISEMPTY( SALES ), SALES[Month of purchase] <> 4 )
),
SALES[Customer],
", "
)
Expertise = List.Accumulate( {Days as from Today}, {Skills and Knowledge}, (Current, Everyday) => Current & Day.LearnAndPractise(Everyday) ) |
Please try the following,
Count of People =
var _OtherCustomers =
CALCULATETABLE(
VALUES('Table'[Customer]),
'Table'[Month of purchase] < 4
)
var _Result =
COUNTROWS(
SUMMARIZE(
FILTER(
'Table',
'Table'[Month of purchase] = 4
&&
NOT('Table'[Customer] in _OtherCustomers)
),
'Table'[Customer]
)
)
return _Result
The idea is to,
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
11 | |
10 | |
10 | |
10 |
User | Count |
---|---|
18 | |
13 | |
12 | |
11 | |
8 |