The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi,
i want to sum my stock grouped by the product_id --> see column sum_stock. How come my negative values are beeing ignored using this formula? the result of the column should be zero, not 76.
Greatful for any help an this!
Solved! Go to Solution.
@Anonymous - Extremely difficult to say without sample source data. Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
Hi @Anonymous
Due to I don't know your data model, I build a sample to have a test.
I build a calculated column and a Measure like yours.
C_Sum Stock = CALCULATE(SUM('Table'[STOCK]),ALLEXCEPT('Table','Table'[Material_SAP.1.C_ProdKeyInID]))
M_Sum Stock = CALCULATE(SUM('Table'[STOCK]),ALLEXCEPT('Table','Table'[Material_SAP.1.C_ProdKeyInID]))
Both of them return to the correct result 0 .
I think your problem may be caused by your data model.
Allexcept function will remove all filters except the filter in Material_SAP.1.C_ProdKeyInID column. And blog below is helpful, they may help you to understand ALl functions in Dax.
Blog: All Function Allexcept Function Allselected Function Managing-all-functions-in-dax
If this reply still couldn't help you to solve your problem, please show me more details about your data model.
Or you can share your pbix file with me by your Onedrive for Business.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous - Extremely difficult to say without sample source data. Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.