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
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!
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 |
|---|---|
| 36 | |
| 33 | |
| 31 | |
| 24 | |
| 18 |
| User | Count |
|---|---|
| 70 | |
| 50 | |
| 33 | |
| 24 | |
| 24 |