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
addd123
Frequent Visitor

Drill down into different data

Hello, 

 

Im trying not only switch the axis when drilling down, but also the values. 

 

i.e. start with:

Axis: Projects     Value: Total expenses

 

To

 

Axis: Employees     Value: Expense A,  Expense B, etc. 

 

I have found this:

 

ChangeInDrillDown = 
     VAR  AverageCalc = AVERAGE(TableName[Amount])
     VAR  SumCalc   = SUM(TableName[Amount])

RETURN
IF(ISFILTERED(TableName[DrillLevel]);SumCalc;AverageCalc)

 

However i cannot find the ChangeInDrillDown on the microsoft website and it gives an error in DAX when creating a measure. If it is correct, where do i input the code and how do i get the drill down button to respond to it?

 

Or is there another way to achieve the above?

 

Kind regards, 

Ad

1 ACCEPTED SOLUTION
v-yuezhe-msft
Employee
Employee

Hi @addd123,

I assume that you refer to this similar thread to write the above formula, right? If that is the case, firstly, there are syntax errors in the formula, please change it to the following formula, replace the columns(Table1[Amount]) and Table1[DrillLevel]) with your own fields.

ChangeInDrillDown =
     VAR  AverageCalc = AVERAGE(Table1[Amount])
     VAR  SumCalc   = SUM(Table1[Amount])
 
RETURN
IF(ISFILTERED(Table1[DrillLevel]),SumCalc,AverageCalc)


 Secondly, you can right click your table and choose “New Measure” to input the code.
Capture.PNG

Thirdly, create clustered column chart, drag your own fields into Axis and drag ChangeInDrillDown into Value. For more details, please check the example in the attached PBIX file.
1.png

Thanks,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yuezhe-msft
Employee
Employee

Hi @addd123,

I assume that you refer to this similar thread to write the above formula, right? If that is the case, firstly, there are syntax errors in the formula, please change it to the following formula, replace the columns(Table1[Amount]) and Table1[DrillLevel]) with your own fields.

ChangeInDrillDown =
     VAR  AverageCalc = AVERAGE(Table1[Amount])
     VAR  SumCalc   = SUM(Table1[Amount])
 
RETURN
IF(ISFILTERED(Table1[DrillLevel]),SumCalc,AverageCalc)


 Secondly, you can right click your table and choose “New Measure” to input the code.
Capture.PNG

Thirdly, create clustered column chart, drag your own fields into Axis and drag ChangeInDrillDown into Value. For more details, please check the example in the attached PBIX file.
1.png

Thanks,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.

Top Solution Authors