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
gheisar
Frequent Visitor

Dynamic filtering

I have the following table from the production test:

SerialNumberProduction lineOutcomeReason of Failure
1Line 1Passedreason 1
2Line 2Passedreason 2
3Line 3Failedreason 3

 

Volume = DISTINCTCOUNT(Products[SerialNumber])+0
Failed = CALCULATE ([Volume],'Products'[Outcome]<>"Passed")
Failed% = [Failed]/[Volume]
In my report when I use a slicer to filter the chart for different lines it would work properly.
when I filter it by reason of failure I want to use the failure by reason 1 divided by total volume. 
When I filter by reason I want to filter the "Failed" measure but I want to keep the total volume unfiltered.
 
4 REPLIES 4
v-jingzhang
Community Support
Community Support

Hi @gheisar 

 

Try adding a new measure to calculate the total volume. Use Allexcept() function to remove all filters except Date filter. 

 

Total = CALCULATE ( [Volume], ALLEXCEPT ( 'Products', 'Products'[Date] ) )

Failed% = [Failed]/[Total]

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Hi @gheisar 

 

Does my reply solve your problem? If yes, kindly accept it as the solution. Otherwise, please provide more details about the problem so that we can work on it further. You can also share your solution if you have solved it. Thanks.

 

Regards,
Community Support Team _ Jing

amitchandak
Super User
Super User

@gheisar , Based on what I got so far, Try like

 

Failed = CALCULATE ([Volume],filetr('Products', 'Products'[Outcome]<>"Passed"))

thanks @amitchandak 

It won't change anything. I got the failed, volume, and FPY right. 

The problem is when I use the Slicer to select the reason I want to filter the failed but keep the volume unfiltered.

gheisar_1-1631553576980.png

 

gheisar_2-1631553611980.png

 

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.