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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

DAX Measure ALL

Hi

I have requirements to get the % of defect using the formula    defect % = defect count  / volume qty.
the problem is i'm getting the overall volume qty  even i'm using a month filter from a page and it should be getting the volume for that particular month.
Right now it display 171166, the correct value should be 25973 of  volume qty. January.   May i know if i'm missing from my measure of volume qty. could not figure out if this is correct.

measure to get the volume qty

volume qty= CALCULATE(table[defect Count], ALL(table))

sample:
 
sample1.jpg
 
Appreciate the help. 
Thank you.
4 REPLIES 4
amitchandak
Super User
Super User

@Anonymous ,

 

Try like

volume qty= CALCULATE(table[defect Count], ALLSELECTED(table))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak its possible to use the code you've given with filter. I need to calculate the defect count and filter the column1 = "ASY"
  CALCULATE(table[defect Count], ALLSELECTED(table))

Anonymous
Not applicable

Hi, Already found the root cause why its is not working correctly when I do the filtering. This is what I found In filter on visual I have excluded the empty defect and also perform top 10 defect. So removed these filters and the volume is displayed correctly. However, how can I perform a top 10% that will not affect the values and also the empty defect will ot be displayed in the visual?

 

Thank you.

Anonymous
Not applicable

Thank you.

The code is working fine when i used to the first type of defect. but when i used it to another type of defect the volume qty is wrong where in it should be the same from the first one 25973.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.