Forum Discussion
On hand Value in DAX
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])
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.
- Anonymous3 years agoNot 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.
- shabirAhmad3 years ago
Helper II
Anonymous ,
Thanks for your kind reply, still not resolved.
Best Regards,
Shabir Ahmad
- shabirAhmad3 years ago
Helper II
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