Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hello.
I would like to build a map chart in which each bubble represents the number of customers per neighborhood,
classifying in the legend those I consider active (made at least one purchase per month) and
inactive (have not bought in the month, but have already bought in another time).
The measure used to calculate "Active Customers" is that one shown below.
Active Customers =
VAR Customers = VALUES(fSales[Customer ID])
RETURN
COUNTROWS(Customers)
The measure used to calculate "Inactive Customers" is that one shown below.
Inactive Customers =
VAR Month = EOMONTH(MAX(fSales[Date]),0)
VAR CurrentCustomers = VALUES(fSales[Customer ID])
VAR TotalCustomers =
CALCULATETABLE(
VALUES(fSales[Customer ID]),
FILTER(
ALL('dCalendar'[Date]),
'dCalendar'[Date] <= MAX('dCalendar'[Date])
),
FILTER(
ALL('dCalendar'[Date]),
'dCalendar'[Date] < Month
)
)
VAR InactiveCustomers = EXCEPT(TotalCustomers,CurrentCustomers)
RETURN
COUNTROWS(InactiveCustomers)
To build a way to create a visualization on the map, I tried to use an auxiliary
table such that it will relate to the customer base through a virtual relationship.
I tried doing this with the measures below.
Customer Classification =
var DateContext = SELECTEDVALUE('dCalendar'[Month/Year Class])
var DateMin =
CALCULATE(
MIN(fSales[Date]),
ALL('dCalendar')
)
var DataStart = YEAR(DataMin)*100+MONTH(DataMin)
var Test =
SWITCH(
TRUE(),
DateContext >= DataContext && [Active Customers] <> BLANK(), 1, //active clients
DateContext >= DataContext && [Active Customers] = BLANK(), 2 //inactive clients
)
RETURN
Test
Medida 2 =
VAR Situation1 = MIN(dActiveInactive[Value 1])
VAR Situation2 = MAX(dActiveInactiveInativo[Value 2])
VAR Result =
CALCULATE(
[Customer Classification],
FILTER(
CROSSJOIN(
VALUES('dCalendar'[Month/Year]),
VALUES(dCustomers[Customer ID])
),
[Customer Classification] > Situation1 && [Customer Classification] <= Situation2
)
)
RETURN
Result
However, I was unable to resolve the issue. Any idea how to solve this?
The intention is to do this without using a calculated column as it would leave the classification static
and ideally, the classification is dynamic.
This is the incorrect classification
Please provide sanitized sample data that fully covers your issue. Paste the data into a table in your post or use one of the file services. Please show the expected outcome.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 76 | |
| 37 | |
| 31 | |
| 27 | |
| 27 |