Join 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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello,
I'm trying to calculate % of product in stock, and I have SKU and Department listed in the Rows. I would like to see the count at the SKU level, but ensure that the Department result is the sum of the individual SKU counts (instead of calculating it using the same SKU-level formula).
The following formula produces the expected result by SKU; the problem is that for the Department it applies the same calculation, meaning every SKU is counted because the total inventory by department is > 5.
I assume some application of IF(HASONEVALUE()) is required here but I'm not familiar enough with the DAX.
In Stock SKU Count =
CALCULATE([SKU Count],
FILTER(SkuHistoricalInventory, [Current OH (var)] > 5)
Solved! Go to Solution.
@tdhlonghorn , Try a measure like
Sumx(Filter(Summarize( Table, Table[Department], Table[SKU], "_measure", [Current OH (var)]), [Current OH (var)]>5), [SKU Count])
@tdhlonghorn , Try a measure like
Sumx(Filter(Summarize( Table, Table[Department], Table[SKU], "_measure", [Current OH (var)]), [Current OH (var)]>5), [SKU Count])
Amazing, that did the trick - thank you!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!