Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
I have the following formula which works great within the matrix.
However as you can tell the subtotal in my matrix is not calualting correctly. For example "period" 2320" should equal 956 (149+807)
@barthand16 , You need measures like , I have both addition and subtraction and Intial Inventory is a measure
Inventory / OnHand
[Intial Inventory] + CALCULATE(SUM(Table[Ordered]),filter(date,date[date] <=maxx(date,date[date]))) - CALCULATE(SUM(Table[Sold]),filter(date,date[date] <=maxx(date,date[date])))
Inventory / OnHand
CALCULATE(firstnonblankvalue('Date'[Month]),sum(Table[Intial Inventory]),all('Date')) + CALCULATE(SUM(Table[Ordered]),filter(date,date[date] <=maxx(date,date[date]))) - CALCULATE(SUM(Table[Sold]),filter(date,date[date] <=maxx(date,date[date])))
Power BI Inventory On Hand: https://youtu.be/nKbJ9Cpb-Aw
As can be seen using the first fomula I get blanks. As well the total is not correct. For instance 2320 should equal 256 not 113. My orginal fomula worked great I just need something that will sum it correct. Also the second formula I kept getting a error that real firstnonblank value needs 2 items.
Hi,
Share the download link of the PBI file.
This has confidential information in the workbook. I cannot share. I beleive the issue is dependent on the rows that are in the Viz. Anything else I can provide?
Hi,
If you can, please share a redacted version of the PBI file.