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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
MartinVollaard
Frequent Visitor

How to change the measure when drilling down in bar chart

Hi All,

 

I'm stuck and tried many provided solutions but can't get it fixed. I am just starting so please help me. I have a bar chart with 2 axis (year and then you can drill down to months). On the month level I sum a column in my datafield  - SUM(Sheet[FIELD]). It provides me with the right number per month. On the year level it sums all underlying months but on that level I need an average.

 

Monthly basis (MAAND):

2018-01-20 20_03_22-Flexkids Power BI Dashboard - Power BI Desktop.png

 

Yearly basis (Here I need an average) Not a sum of 12 months.

2018-01-20 20_03_47-Flexkids Power BI Dashboard - Power BI Desktop.png

This isn't working. I've tried many variations on the measure mentioned below. I'm lost

Measure = IF(ISFILTERED(Sheet[YEAR]) ; SUM(Sheet[FIELD]); SUM(Sheet[FIELD])/12)

 

Many thanks in advance for your help and guidance.

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

 

Try this

 

=IF(HASONEVALUE(Sheet[Month]),SUM(Sheet[FIELD]),SUM(Sheet[FIELD])/12)


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

 

Try this

 

=IF(HASONEVALUE(Sheet[Month]),SUM(Sheet[FIELD]),SUM(Sheet[FIELD])/12)


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

I'm trying to do a similar thing, but with daily data rolling up to a monthly and yearly level.

 

For the lowest (daily) level, I want the bar chart to show the sum of items in each category each day.

For the next (monthly) level, I want it to show the average for the month in each category.

For the top (yearly) level, I want to see the average for the year in each category.

 

How do I do this?

 

Thanks in advance!

 

Anonymous
Not applicable

@Anonymous  I'm trying to do something similar.  Did you ever figure out a solution?

 

Cheers!

Thank you very much!! This is the solution.

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.

Users online (4,591)