This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
first timer. I am trying to do what feels like a simple aggregation. I have a list of customers and their distance to candy stores. I want to summarize the number of customers by their distance to the closest store.
in SQL it looks like this:
Solved! Go to Solution.
A measure solution.
Cust Count by Min Miles =
VAR _milesInFilterContext = VALUES( Table1[Miles Away] )
RETURN
COUNTX(
VALUES( Table1[customerID] ),
VAR _minMileByCust = CALCULATE( MIN( Table1[Miles Away] ), ALL( Table1[Miles Away] ) )
RETURN
IF( _minMileByCust IN _milesInFilterContext, 0 )
)
Formatting: continuous x-axis with title/value labels off + custom format data labels
A measure solution.
Cust Count by Min Miles =
VAR _milesInFilterContext = VALUES( Table1[Miles Away] )
RETURN
COUNTX(
VALUES( Table1[customerID] ),
VAR _minMileByCust = CALCULATE( MIN( Table1[Miles Away] ), ALL( Table1[Miles Away] ) )
RETURN
IF( _minMileByCust IN _milesInFilterContext, 0 )
)
Formatting: continuous x-axis with title/value labels off + custom format data labels
YEP. SAVED MY WEEKEND. TYFYS MARK.
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 30 | |
| 23 | |
| 21 | |
| 18 | |
| 17 |
| User | Count |
|---|---|
| 63 | |
| 35 | |
| 34 | |
| 24 | |
| 23 |