cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Barnee
Advocate IV
Advocate IV

Average per Category that ignores slicers for that exact category

Hi!
I would need some help with the following situation which I have trouble solving.

 

I'd like to create an average per category in a measure that ignores slicer selection for the same category.

 

I tried by using ALL function, but it has an effect on the VALUES part of the measure as well.

Total Session by Campaign = 
CALCULATE(
AVERAGEX(
	KEEPFILTERS(VALUES('Analytics'[Campaign])),
	CALCULATE([Total Sessions])
), ALL('Analytics'[Campaign])
)

I possible, I would need to solve this inside the measure since I can't disable visual interactions in this use-case.
Thanks in advance and reach out if any more detail is needed.

Barna


1 ACCEPTED SOLUTION

Hi @Barnee ,

Please update the formula of your measure "Total Sessions average per Campaign for all the campaigns" as below:

Total Sessions average per Campaign for all the campaigns = AVERAGEX(ALL(sampledata[Campaign]),[Total Sessions])

update measure with all.JPG

I updated it in your sample file, you can get the file from this link.

Best Regards

Rena

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
amitchandak
Super User
Super User

@Barnee , you are using keep filter and all on same field

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

hi @amitchandak 

here is the link where you can find the pbix

Hi @Barnee ,

Please update the formula of your measure "Total Sessions average per Campaign for all the campaigns" as below:

Total Sessions average per Campaign for all the campaigns = AVERAGEX(ALL(sampledata[Campaign]),[Total Sessions])

update measure with all.JPG

I updated it in your sample file, you can get the file from this link.

Best Regards

Rena

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.

thanks, @v-yiruan-msft ! I see now

Barna

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors