Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
meddojeddo
Helper IV
Helper IV

How to show only employees with non-zero sales?

I am asuing Azure cube data source and the measures are created on there. I have a sales table which has a relationship with an employee table. The sales table has a sales sum measure. I am creating a report which has a table showing sum of sales for each employee. But the issue I am having is that it shows employees with 0 sales. The sales sum measure doesn't have the option to not show items with no data. How would I go about hiding showing only the employees with non-zero sales? Am I required to only use columns for the sales table?

1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hi @meddojeddo ,

You can select the related visual and navigate to Filters pane to filter out the value which equal to 0, set the filter condition as below screenshot:

yingyinr_0-1627528464528.png

In addition, you can update the formula of the sales sum measure with add the following condition. Then the visual will filter out the data with blank values.

sales sum measure =
VAR _ssales =
SUM ( 'sales'[sales] )
RETURN
IF ( var_ssales = 0, BLANK (), var_ssales )

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-yiruan-msft
Community Support
Community Support

Hi @meddojeddo ,

You can select the related visual and navigate to Filters pane to filter out the value which equal to 0, set the filter condition as below screenshot:

yingyinr_0-1627528464528.png

In addition, you can update the formula of the sales sum measure with add the following condition. Then the visual will filter out the data with blank values.

sales sum measure =
VAR _ssales =
SUM ( 'sales'[sales] )
RETURN
IF ( var_ssales = 0, BLANK (), var_ssales )

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
PaulDBrown
Community Champion
Community Champion

Assuming you are using the employees table as the filter context in your visual, try

Sales <> 0 = CALCULATE([Sum sales], FILTER(employee table, [Sum sales] > 0))

 

or

sales <>0 = IF([Sum sales] > 0, [Sum sales])





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






@PaulDBrownthe sales measure is actually in the sales table and not the employee table. But the employee dimension column is from the employee table. Is there a way to display only the employees with data in the sales table or would I need to use a different custom measure for that?

if it is a measure it doesn't matter what table it is in





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors