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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
jason_ocp90
New Member

DAX formula for value more than 0

Hi, 

 

I faced the problem of writing the DAX formula to filter out the net saving of the material with more than 0. 
Below is the DAX i wrote for material level.
 
Net Savings > 0 = CALCULATE([Net Savings USD],FILTER(GROUPBY('Raw Material Finance Report','Raw Material Finance Report'[Material.Material Level 01.Key]),[Net Savings USD]>0))
 
However, when I drill down to the next level at component code, the amount for 15116 is not shown as it is a negative number 312,376. Is there anything that I can improve on my existing DAX to get the net saving amount at component level regardless if it is positive or negative?
 

jason_ocp90_0-1708494113806.png

 

Thank you

 

1 REPLY 1
Anonymous
Not applicable

Hi @jason_ocp90 ,
Based on your description, it appears that your current DAX formula is filtering out any negative net savings amounts, which is why you are not seeing amounts for component code 15116. To resolve this issue, you may want to consider adjusting your method to ensure that you can view all net savings amounts at the component level while still applying your filters at the material level.
Here is a modified Dax that may help:

 

Net Savings All Levels =
CALCULATE (
    [Net Savings USD_],
    FILTER (
        ALL ( 'Raw Material Finance Report'[Material.Material Level 01.Key] ),
        'Raw Material Finance Report'[Material.Material Level 01.Key]
            IN VALUES ( 'Raw Material Finance Report'[Material.Material Level 01.Key] )
    )
)

Final output:

vyifanwmsft_0-1709519913599.png

 

 

How to Get Your Question Answered Quickly - Microsoft Fabric Community

If it does not help, please provide more details with your desired out put and pbix file without privacy information.

 

Best Regards,

Ada Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.