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 need a measure to give me a sum of the last balance of all items in a date range.
I created this measure which will give me the latest balance on hand of each item
LatestBOH =
VAR CurrentValue = SELECTEDVALUE(PIX_InventoryCounts[ProductID]
RETURN
MAXX(
FILTER('PIX_InventoryCounts',PIX_InventoryCounts[ProductID] = CurrentValue ),
'PIX_InventoryCounts'[BalanceOnHand])
Example:
the date range is 3/1 thru 3/7
the data is
| Store | Date | ProductID | balanceOnHand |
1 | 3/2/2021 | 1234 | 5 |
| 1 | 3/6/2021 | 1234 | 4 |
| 1 | 3/5/2021 | 9876 | 9 |
| 2 | 3/5/2021 | 1234 | 1 |
| 2 | 3/6/2021 | 9876 | 9 |
| 2 | 3/7/2021 | 9876 | 6 |
the measure LatestBOH returns
| Store | ProductID | LatestBOH |
| 1 | 1234 | 4 |
| 1 | 9876 | 9 |
| 2 | 1234 | 1 |
| 2 | 9876 | 6 |
I need to be able to show the total LatestBOH with all item BOH combined by store.
the data should look like this
| Store | Total |
| 1 | 13 (9+4) |
| 2 | 7 (6+1) |
My attemp at a measure to do this just returned the MAXX of all the items. ie. 9 and 6. But I need a SUM of all the items MAXX value.
Solved! Go to Solution.
@gdavid , Try a measure like
Measure 10 = sumx(ADDCOLUMNS(SUMMARIZE('Table (3)', 'Table (3)'[ProductID], 'Table (3)'[Store],"_2", MAX('Table (3)'[Date])),"_4", maxx(FILTER('Table (3)', 'Table (3)'[Date] =[_2]),'Table (3)'[balanceOnHand])),[_4])
@gdavid , Try a measure like
Measure 10 = sumx(ADDCOLUMNS(SUMMARIZE('Table (3)', 'Table (3)'[ProductID], 'Table (3)'[Store],"_2", MAX('Table (3)'[Date])),"_4", maxx(FILTER('Table (3)', 'Table (3)'[Date] =[_2]),'Table (3)'[balanceOnHand])),[_4])
Thanks. That is what I was looking for. Summarize will help out a lot
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 13 | |
| 9 | |
| 8 | |
| 8 | |
| 7 |