Forum Discussion
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
- amitchandakSuper 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. - v-frfei-msftCommunity 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.