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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi all,
i have a table like below (sample data)
SPDDESC ACTvalue
BOX 20 1000
MNT 20 500
RED 20 600
i having like around 50 SPD Desc . i want calculate SPD share for individual share
for Example if i choose KSBOX20 desc
calculation should be
SPD share = (BOX 20 -ACTvaluetoal)/BOX20
SPD share = (1000 -2100)/1000.
i want to set this formula for all SPDDESC . any idea. i have tired selected value function but not work. thanks in advance
Solved! Go to Solution.
Hi @Anonymous ,
You can try below code:-
SPD_share =
VAR selectedSPD =
SELECTEDVALUE ( 'Table (3)'[SPDDESC] )
VAR totalsum =
CALCULATE ( SUM ( 'Table (3)'[ACTvalue] ), ALL ( 'Table (3)' ) )
VAR selected_spddesc_value =
CALCULATE ( SUM ( 'Table (3)'[ACTvalue] ), 'Table (3)'[SPDDESC] = selectedSPD )
RETURN
DIVIDE ( ( selected_spddesc_value - totalsum ), selected_spddesc_value )
Output:-
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi @Anonymous ,
You can try below code:-
SPD_share =
VAR selectedSPD =
SELECTEDVALUE ( 'Table (3)'[SPDDESC] )
VAR totalsum =
CALCULATE ( SUM ( 'Table (3)'[ACTvalue] ), ALL ( 'Table (3)' ) )
VAR selected_spddesc_value =
CALCULATE ( SUM ( 'Table (3)'[ACTvalue] ), 'Table (3)'[SPDDESC] = selectedSPD )
RETURN
DIVIDE ( ( selected_spddesc_value - totalsum ), selected_spddesc_value )
Output:-
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
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 |
|---|---|
| 20 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 33 | |
| 31 | |
| 19 | |
| 12 | |
| 11 |