Forum Discussion
Filtering out zero/blank Matrix rows, part XXXVI
- 4 months ago
Hi markmsc,
You can try below measure and use it as a filter on table visual
Inventory Row Filter =
VAR NonZeroMonths =
COUNTROWS(
FILTER(
ALLSELECTED('Date'[Month]), -- your column field (May, June, July)
NOT ISBLANK(CALCULATE([Inventory])) &&
CALCULATE([Inventory]) <> 0
)
)
RETURN
IF(NonZeroMonths > 0, 1, 0)๐ I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
๐ก Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
๐ As a proud SuperUser and Microsoft Partner, weโre here to empower your data journey and the Power BI Community at large.
๐ Curious to explore more? [Discover here].
Letโs keep building smarter solutions together!
Hi markmsc
I would normally suggest creating a measure (or an equivalent calculation item) that converts unwanted values to blank, and rely on the default Power BI behaviour where completely blank rows or columns are hidden (due to SUMMARIZECOLUMNS).
However I'm not certain that would meet your requirements.
To clarify, assume this is the original matrix with an additional item "Erasers" and a Total column:
Would you be happy converting the above to either of these options, or something else?
Option A (all zeros converted to blanks):
Option B (zeros converted to blanks only where entire row is zero/blank):