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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.