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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
elietech
Helper II
Helper II

Display a filtered value and an average value for the whole population on a graph

I have data that is similar to the following: 

 

Events Table

INSTRUCTOR NAME        DATE

A                                       d

A                                       d

A                                       d   

B                                       d

B                                       d

 

What I want to do is display a graph that shows the number of events for the selected person, and also show the average number of events per person. 

 
I have a slicer on the page to choose the "Instructor Name" from a list of instructors.
 
Instructor Name = SELECTEDVALUE('Instructor Details'[Instructor Name],"...")

TotalInst = DISTINCTCOUNT('Instructor Details'[Inst Personnel ID])

TotalEvents = countrows(Events)

TotalEvents for Instructor = calculate(countrows(events),filter(events, events(instructorname) <> Instructor Name

Events per Capita = TotalEvents / TotalInst

(sorry for the crap dax...hopefully that makes sense)

 

Then I want to display this on a vertical bar graph with the horizontal axis representing Month Name, and for each month show the "TotalEvents for Instructor" next to the "Events per Capita"

 

Problem is, as you can probably guess, is that instead of the Events Per Capita giving me the average events per instructor, it is filtered by the same slicer on the page and gives me events per instructor.  Is there any way to have this measure ignore the page slicer, but still display properly for each month on horizontal axis of the visualization? 

 

Sorry if this makes no sense...I think I even confused myself while typing this. 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@elietech 

You can try something like that

TotalInst = calculate(DISTINCTCOUNT('Instructor Details'[Inst Personnel ID]),all('Instructor Details'))

TotalEvents =  calculate(countrows(Events),all(Events))

Avg Events per Capita = [TotalEvents]/[TotalInst ]

 

Can you share sample data and sample output.

 

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

View solution in original post

3 REPLIES 3
Greg_Deckler
Community Champion
Community Champion

To override the slicer, use ALL, ALLEXCEPT or REMOVEFILTERS.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
amitchandak
Super User
Super User

@elietech 

You can try something like that

TotalInst = calculate(DISTINCTCOUNT('Instructor Details'[Inst Personnel ID]),all('Instructor Details'))

TotalEvents =  calculate(countrows(Events),all(Events))

Avg Events per Capita = [TotalEvents]/[TotalInst ]

 

Can you share sample data and sample output.

 

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

Thanks!  

 

I was so close...this definately worked though.  Along with a small correction to my relationships on my date table, we are up and running. 

 

Appreciate it!

 

-Bill

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors