Join 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!Get Fabric certified for FREE! Don't miss your chance! Learn more
Hi @SachinC ,
your specifications is a bit short when it comes to what your desired outcome is. Here is the code for creating a calculated column:
PercentageReturns =
VAR _route =
CALCULATE ( SELECTEDVALUE ( 'Table'[Route] ) )
VAR _drops =
CALCULATE (
SUM ( 'Table'[TotalDrops] );
FILTER ( ALL ( 'Table' ); 'Table'[Route] = _route )
)
VAR _returns =
CALCULATE (
SUM ( 'Table'[Returns] );
FILTER ( ALL ( 'Table' ); 'Table'[Route] = _route )
)
RETURN
DIVIDE ( _returns; _drops )
keep in mind that when you aggregate like this in a calculated column, the value is repeated for each route, and if you later on sum over this column, it will be wrong.
For some reason that didn't work. Bear in mind Returns is a Count not Sum.
is there a ";" missing? It's suggesting it is.
Thanks!
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 68 | |
| 59 | |
| 48 | |
| 20 | |
| 16 |
| User | Count |
|---|---|
| 107 | |
| 106 | |
| 39 | |
| 27 | |
| 27 |