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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
JediMole
Helper II
Helper II

New average measure rolls up when I drill 'up' in a visual

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!)

JediMole_1-1750364129940.png

 

JediMole_4-1750364251106.png

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])
)

 

2 REPLIES 2
Elena_Kalina
Solution Supplier
Solution Supplier

Hi @JediMole 

The issue you're experiencing occurs because Power BI treats collapsed totals differently from expanded rows.

When you collapse the visual:

  1. The row-level context is lost

  2. Your VALUES() function returns all values instead of filtered ones

  3. 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.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.