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
Anonymous
Not applicable

SQL to DAX expression .. Urgent plz ..

Hi All,

Below is the code from Sql .  i need to write the same in the dax expression . all the fields are comin from same table 

 

1) sum( totalmarketvalue) over (partition by account_sys_no, trustee_minor_number) as marketValue,

 

2) sum(totalmarketvalue) over (partition by account_sys_no, trustee_major_number, trustee_minor_number)
/
sum(totalmarketvalue) over () * 100 as actualPercentage,

Urgent plz ..!!!

Thanks

2 REPLIES 2
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

Please try to create measure like this.

 

marketValue= CALCULATE(SUM(table[value]),ALLEXCEPT(table,[ account_sys_no],[trustee_minor_number])

If it doesn't meet your requirement, kindly share your sample data and excepted result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
amitchandak
Super User
Super User

you need to create category subtotal

https://www.sqlbi.com/articles/using-allexcept-versus-all-and-values/

 

Also Please refer

https://community.powerbi.com/t5/Desktop/highest-value-by-category/td-p/428758

https://community.powerbi.com/t5/Desktop/Filter-only-highest-value-by-category/td-p/117841

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.

Top Solution Authors