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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
shabirAhmad
Helper II
Helper II

On hand Value in DAX

Hi Experts,

 

I just need on hand Quantity on the below table as i am new to Power Bi can someone give me suitable DAX code to achieve this quatity.Thanks in Advance as you experts resolve my other issue only here i am stuck from a week.

Table name is = PowerBIInventonhanditem and field name is AvailPhysical

 

shabirAhmad_1-1693545792397.png

Best Regards,

Shabir Ahmad

11 REPLIES 11
Anonymous
Not applicable

Hi @shabirAhmad ,

 

To calculate the total on-hand quantity for the field in the table, you can create a DAX measure:

Total On Hand Quantity = SUM(PowerBIInventonhanditem[AvailPhysical])

vtangjiemsft_0-1693809777220.png

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

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

 

Hi to all,

 

What is the issue, this field is coming from dynamics ERP so there is it was shown on the form a calculated column such as "Measure" in DAX. 

Anonymous
Not applicable

Hi @shabirAhmad ,

 

I don't have access to your pbix file. Has your problem been solved? If the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. If not, please point it out. Thanks in advance.

 

Best Regards,

Neeko Tang

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

@Anonymous ,

 

Thanks for your kind reply, still not resolved.

 

Best Regards,

Shabir Ahmad

Hi All,

This is the code in Dynamics ERP system to display the onhand quantity

 

return this.PostedQty + this.Received - this.Deducted + this.Registered - this.Picked;

 

In DAX i applied the below formula in Measure

 

On Hand = SUM(POWERBIUEINVENTONHANDITEM[POSTEDQTY]) + SUM(POWERBIUEINVENTONHANDITEM[RECEIVED]) - SUM(POWERBIUEINVENTONHANDITEM[DEDUCTED]) + SUM(POWERBIUEINVENTONHANDITEM[REGISTERED]) - SUM(POWERBIUEINVENTONHANDITEM[PICKED])- SUM(POWERBIUEINVENTONHANDITEM[RESERVPHYSICAL])

 

 

Best Regards,

Shabir Ahmad

rrm121812
Helper II
Helper II

Hi Shabir,

 

You can try this DAX : On Hands Quantity =VALUES('PowerBIInventonhanditem'[AvailPhysical]).

 

If this is what you were looking for, please provide a Kudo and Accept this as a solution for better reach to other people.

Hi @rrm121812 

 

I did   

OnHnad = VALUES(POWERBIUEINVENTONHANDITEM[AVAILPHYSICAL]).
But Error , DIdn't work for me
 
Best Regards,
Shabir Ahmad

Can you share pbix file? 

How can i share here is not option of file attached.

 

Best Regards,

Shabir Ahmad

You can upload the file on google drive and share the link

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.

Top Solution Authors