Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
The behavior of this visual is creating confusion. The averages for attendees is right in the screen shot below, but if\when the user collapses the the visual, the average works\shows for all the events, (hence the confusion!)
Is there a way to stop that from happening?
this is the cal on the measure
Average per Total Attended =
AVERAGEX(
KEEPFILTERS(VALUES('Combined Event Data'[Total Attended])),
CALCULATE([Sum of Total Attended])
)
Hi @JediMole
The issue you're experiencing occurs because Power BI treats collapsed totals differently from expanded rows.
When you collapse the visual:
The row-level context is lost
Your VALUES() function returns all values instead of filtered ones
The average recalculates across all data
Try this measure
Average per Total Attended = IF( HASONEVALUE('Combined Event Data'[Client]), // Row-level calculation DIVIDE( [Sum of Total Attended], [Count of Events] ), // Grand total calculation DIVIDE( SUM('Combined Event Data'[Total Attendees]), SUM('Combined Event Data'[Total Events]), 0 ) )
Playing with this now. DAX and measures are Greek to me so I'm learning this as I go! That said I think I need to make a total events measure to, to get this to work properly so I'm doing that first.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
81 | |
75 | |
60 | |
37 | |
33 |
User | Count |
---|---|
102 | |
56 | |
52 | |
45 | |
40 |