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
ktt777
Helper V
Helper V

measure and multiple slicer

Hi , 

 

 i have my data here: 

 

How can i get average sale not affected my slicer "type" ? 

 

I want to calculate the average for status "Active" for different region and country in different month. I don't want the Type slicer is applied to my average in this graph .

 

My file is here : https://1drv.ms/u/s!ApIDnMK2eKiFgQJr9w9NZ7Hr8fQS?e=fYjt0f

 

 

thanks 

1 ACCEPTED SOLUTION
az38
Community Champion
Community Champion

@ktt777 

try

Average Sale = 
var numerator = CALCULATE(SUM(Sheet4[Sale ]),Sheet4[Status]="Active",ALL(Sheet4[Type]))
var denominator = CALCULATE(COUNTROWS(Sheet4),Sheet4[Status]="Active",ALL(Sheet4[Type]))

return 

divide(numerator,denominator)

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

4 REPLIES 4
az38
Community Champion
Community Champion

@ktt777 

try to use option Edit interaction for your type s;licer - https://docs.microsoft.com/en-us/power-bi/create-reports/service-reports-visual-interactions

deactivate Average sales chart for this slicer


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

 is there a way to  do with changing measure ? 

 

There is still other thing in the same chart that i want the "Type" slicer to be applied .

 

I want to count number of countries in the month that the sale below the average ?

Number of  countries will be applied filter "Type", but average is not .

and i want these 2 measure are in the same gragh

@ktt777 
Go with this measure:

 

Average Sale = var numerator = CALCULATE(SUM(Sheet4[Sale ]),FILTER(ALL(Sheet4),Sheet4[Status]="Active"), 
FILTER(ALL(Sheet4),[Period].[Month]=MAX([Period].[Month])))

var denominator = CALCULATE(COUNTROWS(Sheet4),FILTER(ALL(Sheet4),Sheet4[Status]="Active"), 
FILTER(ALL(Sheet4),[Period].[Month]=MAX([Period].[Month])))

return divide (numerator, denominator)

 


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

az38
Community Champion
Community Champion

@ktt777 

try

Average Sale = 
var numerator = CALCULATE(SUM(Sheet4[Sale ]),Sheet4[Status]="Active",ALL(Sheet4[Type]))
var denominator = CALCULATE(COUNTROWS(Sheet4),Sheet4[Status]="Active",ALL(Sheet4[Type]))

return 

divide(numerator,denominator)

do not hesitate to give a kudo to useful posts and mark solutions as solution
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.