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
BIdeveloper
Regular Visitor

How to make one of filters not affecting

Hi,

 

I am in total lock with easy thing. I want to make a measure of % of total  based on one filter.  How to write this formula?

 

I want to make a measure that I tick from filter Apple and then it shows the amount of apples as a percentage of all fruits. I know this is simple, but how to write the formula?

 

FruitAmount
Apple3
Carrot4
Peach2
Apple1
Carrot2
Peach5
 
  
  
  
1 ACCEPTED SOLUTION

Hi @BIdeveloper,

 

We can create two calculated table to use as slicer.

 

Region = DISTINCT(Table1[Region])
Fruit = DISTINCT(Table1[Fruit])

Then create a measure to work on it.

 

new1 = 
var fru = SELECTEDVALUE(Fruit[Fruit])
var reg = SELECTEDVALUE(Region[Region])
var sele = CALCULATE(SUM(Table1[Amount]),FILTER(Table1,Table1[Fruit]=fru&& Table1[Region]=reg))
var alls = CALCULATE(SUM(Table1[Amount]),ALLSELECTED(Table1))
return 
sele/alls

 

Capture.PNG

For more details, please check the pbix as attached.

 

Regards,

Frank

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

View solution in original post

12 REPLIES 12

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