Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hello! I'm creating a "Salesman of the month" visual that displays the employee name on a column on my dim table of employees, using a visual filter, that shows the TOP N value based on a metric called [% Real. x Meta Vlr NMRR]
that calculates de SUM of sales that they made in the current month. But whenever I have a new month, all values on this metric are equal to 0, so my visual displays a random name of a salesman, but i want it to display Blank() or NULL or something else.
How do I adapt my Filter in order to return nothing when all values of my metric are equal to zero?
Solved! Go to Solution.
To avoid showing a random employee in that case, you can wrap your measure with a check. For example:
SalesMetricAdj =
IF (
   SUM ( FactSales[Metric] ) = 0,
   BLANK(),
   SUM ( FactSales[Metric] )
)
Or, if you want to check across the whole month:
SalesMetricAdj =
IF (
   CALCULATE ( SUM ( FactSales[Metric] ), ALL ( Employees ) ) = 0,
   BLANK(),
   SUM ( FactSales[Metric] )
)
Now use SalesMetricAdj in your Top N filter instead of the original metric. This way, when all values are 0, the measure returns BLANK, and the visual won’t show any salesman.
To avoid showing a random employee in that case, you can wrap your measure with a check. For example:
SalesMetricAdj =
IF (
   SUM ( FactSales[Metric] ) = 0,
   BLANK(),
   SUM ( FactSales[Metric] )
)
Or, if you want to check across the whole month:
SalesMetricAdj =
IF (
   CALCULATE ( SUM ( FactSales[Metric] ), ALL ( Employees ) ) = 0,
   BLANK(),
   SUM ( FactSales[Metric] )
)
Now use SalesMetricAdj in your Top N filter instead of the original metric. This way, when all values are 0, the measure returns BLANK, and the visual won’t show any salesman.
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.