Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
klehar
Helper V
Helper V

conditional sum

Hi,

I have a stripped down data for 1 opportunity below. Actual data has 100s of opportunities. I want to create 2 measures.

OpportunityBusinessProduct LineOpp ValueOrder Value
Opp1SoftwarePL1100200
Opp1SoftwarePL2200200
Opp1SoftwarePL3300200
Opp1SoftwarePL4400200
Opp1HardwarePL1100300
Opp1HardwarePL2200300
Opp1HardwarePL3300300
Opp1HardwarePL4400300

Opp measure = My opp value is at product line level which means I want the measure to be 100+200+300+400 = 1000

Order value measure = My order value is at Business column lebel which means I want the measure to be 200+300 = 500

 

How can i acheive these measures?

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@klehar add two measures:

 

Business Value = SUMX ( SUMMARIZE ( Opp, Opp[Opportunity], Opp[Business], "@Value", MAX ( Opp[Order Value] ) ), [@Value] )

Business Value = SUMX ( SUMMARIZE ( Opp, Opp[Opportunity], Opp[Business], "@Value", MAX ( Opp[Order Value] ) ), [@Value] )

 

Follow us on LinkedIn

 

Check my latest blog post Comparing Selected Client With Other Top N Clients | PeryTUS  I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

6 REPLIES 6
parry2k
Super User
Super User

@klehar SUMMARIZE is creating a virtual table and "@value" is just a column name to hold the max value in that virtual table. I hope it helps.

 

Follow us on LinkedIn

 

Check my latest blog post Comparing Selected Client With Other Top N Clients | PeryTUS  I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@klehar add two measures:

 

Business Value = SUMX ( SUMMARIZE ( Opp, Opp[Opportunity], Opp[Business], "@Value", MAX ( Opp[Order Value] ) ), [@Value] )

Business Value = SUMX ( SUMMARIZE ( Opp, Opp[Opportunity], Opp[Business], "@Value", MAX ( Opp[Order Value] ) ), [@Value] )

 

Follow us on LinkedIn

 

Check my latest blog post Comparing Selected Client With Other Top N Clients | PeryTUS  I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k Thanks a ton.

What does @value do. Im confused

klehar
Helper V
Helper V

ryan_mayu
Super User
Super User

@klehar 

i am confused about your sample data

Opportunity Business Product Line Opp Value Order Value
Opp1 Software PL1 100

100

Opp1 Software PL2 200 200
Opp1 Software PL3 300 300
Opp1 Software PL4 400 400
Opp1 Hardware PL1 1000 500
Opp1 Hardware PL2 2000 600
Opp1 Hardware PL3 3000 700
Opp1 Hardware PL4 4000 800

what's your expected result for above sample data?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




hI @ryan_mayu 

so i want to measures. lets call it opp value new and order value new

opp value is repeating at product line level

order value is repeating at business column level.

 

This is happening because the table is denormalised.

I dont want repititve values 

so as explaineda above 

opp value new measure = 100+200+300+400 (at product line level)

order value new measure = 200 + 300 (at software level)

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.