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 during Fabric Data Days. Don't miss your chance! Request now
Hi,
I have a table:
I would like to take the first value of ID and prorate between the same IDs using DAX. Thus:
| ID | DESCONTO | FRETE |
| 1 | 6,66 | 0 |
| 1 | 6,66 | 0 |
| 1 | 6,66 | 0 |
| 2 | 0 | 3,42 |
| 2 | 0 | 3,42 |
| 2 | 0 | 3,42 |
| 2 | 0 | 3,42 |
Thanks for your any help.
Solved! Go to Solution.
Hi @credencial ,
You can create calculated columns like this:
DES =
DIVIDE (
FIRSTNONBLANK ( 'Table'[DESCONTO], 1 ),
CALCULATE ( COUNT ( 'Table'[ID] ), 'Table'[ID] = EARLIER ( 'Table'[ID] ) )
)FRE =
DIVIDE (
FIRSTNONBLANK ( 'Table'[FRTE], 1 ),
CALCULATE (
COUNT ( 'Table'[ID] ),
FILTER ( ALL ( 'Table' ), 'Table'[ID] = EARLIER ( 'Table'[ID] ) )
)
)
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @credencial ,
You can create calculated columns like this:
DES =
DIVIDE (
FIRSTNONBLANK ( 'Table'[DESCONTO], 1 ),
CALCULATE ( COUNT ( 'Table'[ID] ), 'Table'[ID] = EARLIER ( 'Table'[ID] ) )
)FRE =
DIVIDE (
FIRSTNONBLANK ( 'Table'[FRTE], 1 ),
CALCULATE (
COUNT ( 'Table'[ID] ),
FILTER ( ALL ( 'Table' ), 'Table'[ID] = EARLIER ( 'Table'[ID] ) )
)
)
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @credencial
Try these measures:
DESCONTO Measure =
Var _MAX = max('Table'[DESCONTO])
Var _Count=COUNT('Table'[ID_VENDA])
return
_MAX/_CountFRETE Measure =
Var _MAX = max('Table'[FRETE])
Var _Count= COUNT('Table'[ID_VENDA])
return
_Max/_CountOutput:
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 9 | |
| 9 | |
| 8 | |
| 6 | |
| 6 |
| User | Count |
|---|---|
| 22 | |
| 20 | |
| 20 | |
| 14 | |
| 14 |