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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
shabirAhmad
Helper II
Helper II

Getting lastest Item Quantity of item

 

Hi Experts,

We are using dynamics ERP system in that On hand value of the item is latest value of item quanity and total quantity.But in Power BI if i select Posted quantity as sum it shows wrong values if i click don't summarize it also not giving me right quantity of item. There is any solution for this. My requirement is to get latest and total value of item quanitity.

 

 

Best Regards,

Shabir Ahmad 

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

You will need to use the LASTNONBLANK() function in a measure to solve this problem.  To receive further help, share data in a format that can be pasted in an MS Excel file and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi  @shabirAhmad ,

 

For the latest value of item quantity and the total quantity, you can create the following measures:

latest value of item quanity =
SUMX(
    FILTER(ALL('Table'),
    'Table'[Date]=MAXX(ALL('Table'),'Table'[Date])),[Posted quantity])
total quantity =
SUMX(ALL('Table'),[Posted quantity])

 

If I have misunderstood your meaning, please provide your desired output.

vyangliumsft_0-1693275887822.png

 

Best Regards,

Liu Yang

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

danextian
Super User
Super User

Hi @shabirAhmad ,

 

Please provide a sample data that isn't an image and the expected result using that sample data.

https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/td-p/144... 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.