Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
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.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 52 | |
| 38 | |
| 37 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 67 | |
| 67 | |
| 34 | |
| 32 | |
| 29 |