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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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